Skip to content

Instantly share code, notes, and snippets.

@wcharczuk
Created January 25, 2012 20:01
Show Gist options
  • Save wcharczuk/1678325 to your computer and use it in GitHub Desktop.
Save wcharczuk/1678325 to your computer and use it in GitHub Desktop.
installing postgres on os x lion w/ brew
#install postgres
brew install postgres
#setup postgres db dir
initdb -D /usr/local/var/postgres #init the database
#set postgres to load automatically && start postgres
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/postgresql/9.1.2/org.postgresql.postgres.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist
#and your'e off!
psql template1
#to make a new database
CREATE ROLE smoke_signal with Password 'yourpassword'
CREATE DATABASE SmokeSignal with owner = smoke_signal;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment