sudo mkdir /Volumes/Data/Postgresql/perfido
Then you make sure that it's owned by the user postgressudo chown -R postgres:postgres /Volumes/Data/Postgresql
and finally you create the databasesudo su postgres -c "initdb -D /Volumes/Data/Postgresql/perfido"
and you're ready to go.
If things don't work (you get a "could not connect to server" message) it's very likely a path issue (see this), and therefore fix your path:export PATH=/opt/local/lib/postgresql93/bin:$PATHTo start postgres automatically use:
sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql93-server.plist
Change to "unload" to stop the system from starting postgres automatically.
No comments:
Post a Comment