Likely most OS X users know of Homebrew, but Homebrew is a package manager for OS X that allows you to easily install and run a massive library of applications and utilities with ease.
We won’t go through the entire (albeit short) installation process of Homebrew, but if you wish to install Homebrew and use it for PostgreSQL management, check out the installation command on the official documentation. If you aren’t sure if Homebrew is installed, try the
which brew command from the terminal to verify.
Once Homebrew is installed, you can install PostgreSQL by issuing the following commands in your terminal:
The first two commands are used to update Homebrew and report any potential issues (if necessary). Then, of course,
brew install postgres is the one-line command for installing PostgreSQL.
You should see a good deal of useful information in the output during installation, much of which should be copied down for use in the next sections.