Skip to content

Instantly share code, notes, and snippets.

@ngpestelos
Created February 21, 2014 01:56
Show Gist options
  • Save ngpestelos/9127391 to your computer and use it in GitHub Desktop.
Save ngpestelos/9127391 to your computer and use it in GitHub Desktop.
How to initialize PostgreSQL on OS X

Requirements

  • postgresql compiled and installed
  • postgres user created

Steps

su postgres
/opt/local/pgsql/bin/initdb -D /opt/local/pgsql/data

Post-processing (as root)

sudo dscl . -change /Users/postgres UserShell /bin/bash /usr/bin/false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment