Installing Postgres on MAC

  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.

Applied Deep Learning Engineer | LinkedIn

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store