Install Postgres:
$ brew install postgresql
Install Homebrew Services:
$ brew tap homebrew/services
Start Postgres as a service:
$ brew services start postgres
Bootstrap a database:
$ createdb
Verify that Postgres is running:
$ psql
If it worked, you'll see something like this:
psql (9.5.3)
Type "help" for help.
dannyfritz=#
Quit out of psql
with \q
:
psql (9.5.3)
Type "help" for help.
dannyfritz=# \q
$
Congratulations! Now Postgres will start automatically on login!
See a list of all services running with:
$ brew services list
Stop Postgres from running with:
$ brew services stop postgres
Well comprised; easy to use!