Skip to content

Instantly share code, notes, and snippets.

@jazzido
Created October 19, 2010 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jazzido/634429 to your computer and use it in GitHub Desktop.
Save jazzido/634429 to your computer and use it in GitHub Desktop.
==> Caveats
To build plpython against a specific Python, set PYTHON prior to brewing:
PYTHON=/usr/local/bin/python brew install postgresql
See:
http://www.postgresql.org/docs/9.0/static/install-procedure.html
If this is your first install, create a database with:
initdb /usr/local/homebrew/var/postgres
If this is your first install, automatically load on login with:
cp /usr/local/homebrew/Cellar/postgresql/9.0.1/org.postgresql.postgres.plist ~/Library/LaunchAgents
launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist
If this is an upgrade and you already have the org.postgresql.postgres.plist loaded:
launchctl unload -w ~/Library/LaunchAgents/org.postgresql.postgres.plist
cp /usr/local/homebrew/Cellar/postgresql/9.0.1/org.postgresql.postgres.plist ~/Library/LaunchAgents
launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist
Or start manually with:
pg_ctl -D /usr/local/homebrew/var/postgres -l /usr/local/homebrew/var/postgres/server.log start
And stop with:
pg_ctl -D /usr/local/homebrew/var/postgres stop -s -m fast
If you want to install the postgres gem, including ARCHFLAGS is recommended:
env ARCHFLAGS="-arch x86_64" gem install pg
To install gems without sudo, see the Homebrew wiki.
==> Summary
/usr/local/homebrew/Cellar/postgresql/9.0.1: 1176 files, 19M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment