Menu
Install PostgreSQL on Mac OS X via Brew Akbar S. Ahmed Feb 21, 2015 Step-by-step instructions PostgreSQL is an open source object-relational database. It is a popular database choice when using a relational database. Installing PostgreSQL on Mac OS X is simple. Software versions The instructions in this post were created / tested using the following sofware versions:. Mac OS X Yosemite 10.10. HomeBrew 0.9.5.
PostgreSQL 9.4 Install PostgreSQL via Brew First, we will update Brew and then install PostgreSQL. Brew update brew install postgres Start PostgreSQL Start the PostgreSQL server in the foreground.
There are optional instructions below in case you would like to start PostgreSQL automatically. Brew initializes the database during installation.
Postgres -D /usr/local/var/postgres Login to PostgreSQL for the first time. Press Cmd + T to open a new terminal tab. Whoami is surrounded by backticks, not single quotes. Createdb `whoami` Login to PostgreSQL with your user account. Psql Optional: Install AdminPack AdminPack is used by PgAdmin. If you plan on using the PgAdmin UI, then installing AdminPack is a good idea. Psql postgres -c 'CREATE EXTENSION 'adminpack';' Optional: Configure PostgreSQL to start automatically The commands below configure PostgreSQL to start automatically.
Mkdir -p /Library/LaunchAgents ln -sfv /usr/local/opt/postgresql/.plist /Library/LaunchAgents launchctl load /Library/LaunchAgents/homebrew.mxcl.postgresql.plist Summary Congrats. PostgreSQL is now installed on Mac OS X.
The user should be postgres, passwords can be changed with root privileges. OS X has a tool for this, don't know the name right now. Robert Prather wrote: > This will likely sound stupid, but I installed PostgreSQL on my Mac a > few weeks ago and got diverted. I tried to return to it and discovered. How to install PostgreSQL 9.6 on Mac OS X (10.7 or later) PostgreSQL is an open source relational database system that has been around for well over a decade and has proven to be a great all around storage choice when developing a web application.
You are now ready to start using PostgreSQL for development.