Apple

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
psql

# 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 


Want me to help develop your next project or application?

Contact Us

Specializing in Ruby-on-Rails, Javascript, Multi-Platform Electron Desktop Apps and Hybrid Cordova Mobile Apps.

Recommended Posts