How To Install PostgreSQL Using Brew On OSX

Posted by Weston Ganger on March 09, 2016

Everyone deserves some quick copy & paste action for their system setup.

Here a quick setup for PostgreSQL on OSX using brew

# update & install
brew update
brew install postgres

# create postgres db
postgres -D /usr/local/var/postgres

create your username db
createdb `whoami`

# login to using your user account for first time

# Start Automatically on System Starup
mkdir -p ~/Library/LaunchAgents
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

# Optional: Install AdminPack for PgAdmin
psql postgres -c 'CREATE EXTENSION "adminpack";'

Now your rockin with PostgreSQL!

Related External Links:

Posted in OSX and Tagged with postgresql osx brew 

Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts