Skip to content

Instantly share code, notes, and snippets.

@thattimc
Created May 27, 2017 12:18
Show Gist options
  • Save thattimc/9a8d6f91bb547d461f9a4bfd5c54e115 to your computer and use it in GitHub Desktop.
Save thattimc/9a8d6f91bb547d461f9a4bfd5c54e115 to your computer and use it in GitHub Desktop.
Install PostgreSQL Using Brew On OSX
# 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";'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment