Created
September 13, 2013 09:35
-
-
Save davidkelley/6548536 to your computer and use it in GitHub Desktop.
Commands to setup Postgresql on OS X.
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 | |
brew update | |
brew doctor | |
brew uninstall postgresql || true | |
brew install postgresql | |
initdb /usr/local/var/postgres -E utf8 | |
gem install lunchy | |
mkdir -p ~/Library/LaunchAgents | |
$PATH=`find /usr/local/Cellar -name "*.postgresql.*"` | |
cp $PATH ~/Library/LaunchAgents/ | |
lunchy start postgres | |
#Uninstall the postgres gem and re-install it to adjust make paths | |
gem uninstall pg || true | |
gem install pg | |
echo "Use the lunchy gem to control your postgresql install" | |
echo "Create a database now: $ createdb database_name" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment