DEV Community

0xkoji
0xkoji

Posted on

Install PostgreSQL on Mac via brew

install

This case is installing 9.6. If you remove @9.6, you will get the latest version of PostgreSQL.

$ brew reinstall postgresql@9.6
$ echo 'export PATH="/usr/local/opt/postgresql@9.6/bin:$PATH"' >> ~/.zshrc
or 
$ echo 'export PATH="/usr/local/opt/postgresql@9.6/bin:$PATH"' >> ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

start & stop

$ brew services start postgresql
$ brew services stop postgresql
$ brew services list
Enter fullscreen mode Exit fullscreen mode

Top comments (0)