Skip to content

Instantly share code, notes, and snippets.

@azimidev
Last active August 26, 2017 14:36
Show Gist options
  • Save azimidev/6bb8f8cfe5f38258d1ef52f218daf465 to your computer and use it in GitHub Desktop.
Save azimidev/6bb8f8cfe5f38258d1ef52f218daf465 to your computer and use it in GitHub Desktop.
Run PostgreSQL on Mac Using Homebrew Install

Steps to install and run PostgreSQL using Homebrew (Mac OS X) (if you aren't using version 9.1.5, change line 6 with the correct version)

  1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
  2. brew update
  3. initdb /usr/local/var/postgres -E utf8
  4. pg_upgrade -b /usr/local/Cellar/postgresql/9.4.6/bin -B /usr/local/Cellar/postgresql/9.4.6/bin -d /usr/local/var/postgres -D /usr/local/var/postgres
  5. cp /usr/local/Cellar/postgresql/9.4.6/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
  6. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment