Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# install and select
sudo port install postgresql93-server
sudo port select --set postgresql postgresql93
# load at startup
sudo port load postgresql93-server
# create the default database
sudo mkdir -p /opt/local/var/db/postgresql93/defaultdb
sudo chown postgres:postgres /opt/local/var/db/postgresql93/defaultdb
sudo su postgres -c '/opt/local/lib/postgresql93/bin/initdb -D /opt/local/var/db/postgresql93/defaultdb'
# create a new user (or you can simply use the default user postgres which does not require a password)
createuser --superuser your_username -U postgres -P
# create a new database
createdb database_name
@ChicagoDev

This comment has been minimized.

Copy link

@ChicagoDev ChicagoDev commented Jul 1, 2014

Hi Chris. Your tutorial here is great, and it really helped me out. However, one step is missing during my installation on Mavericks. You may want to add it, as some people may find it necessary also. You can find my changes in the forked gist here: https://gist.github.com/Blake--/18f15c39ac70bdaba20f . I also attribute the command to a Stack Overflow thread.

@ChicagoDev

This comment has been minimized.

Copy link

@ChicagoDev ChicagoDev commented Jul 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.