Installing Postgres on MAC

Nitin Pasumarthy
1 min readJun 6, 2018

--

  1. Install Homebrew
  2. brew install postgres
  3. initdb /usr/local/var/postgres
  4. To start server at startup
  5. mkdir -p ~/Library/LaunchAgents
  6. ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
  7. launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
  8. /usr/local/Cellar/postgresql/<version>/bin/createuser -s postgres

Now, it is set up, login using psql -U postgres -h localhost or use PgAdmin for GUI.

By default user postgres will not have any login password.

Originally published at sites.google.com.

--

--