Created
April 27, 2011 18:43
-
-
Save kfitzpatrick/944901 to your computer and use it in GitHub Desktop.
Crappy install of postgres, but it totally works
This file contains hidden or 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
#!/bin/bash | |
# This is only for development machines. Probably could be made a lot better. | |
sudo brew update | |
sudo chown -R pivotal /usr/local | |
# blow away default image's data directory | |
rm -rf /usr/local/var/postgres | |
brew remove postgresql | |
brew install postgresql | |
initdb -U pivotal --encoding=utf8 --locale=en_US /usr/local/var/postgres | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start | |
# Make the launch agents | |
mkdir -p ~/Library/LaunchAgents | |
# start PG on restart | |
cp /usr/local/Cellar/postgresql/9.0.4/org.postgresql.postgres.plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment