Created
July 23, 2011 13:01
-
-
Save nickyp/1101395 to your computer and use it in GitHub Desktop.
homebrew-postgresql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If this is your first install, create a database with: | |
initdb /usr/local/var/postgres | |
If this is your first install, automatically load on login with: | |
mkdir -p ~/Library/LaunchAgents | |
cp /usr/local/Cellar/postgresql/9.0.4/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/Cellar/postgresql/9.0.4/org.postgresql.postgres.plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist | |
Or start manually with: | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start | |
And stop with: | |
pg_ctl -D /usr/local/var/postgres stop -s -m fast | |
Some machines may require provisioning of shared memory: | |
http://www.postgresql.org/docs/current/static/kernel-resources.html#SYSVIPC | |
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/Cellar/postgresql/9.0.4: 2577 files, 34M, built in 105 seconds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment