Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nielsjansendk/534440 to your computer and use it in GitHub Desktop.
Save nielsjansendk/534440 to your computer and use it in GitHub Desktop.
First, install macports if you haven't already.
sudo port install postgresql84 postgresql84-server
sudo mkdir -p /opt/local/var/db/postgresql84/defaultdb
sudo su postgres -c '/opt/local/lib/postgresql84/bin/initdb -E UTF8 -D /opt/local/var/db/postgresql84/defaultdb'
sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql84-server.plist
sudo su postgres -c '/opt/local/lib/postgresql84/bin/postgres -D /opt/local/var/db/postgresql84/defaultdb'
sudo env ARCHFLAGS="-arch x86_64" gem install pg
createuser --superuser macusername -U postgres
Where macusername is you username on your mac. That should do it. Install pgadmin if you like.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment