Installing PostgreSQL 9.4 beta2 on Mac OS X 10.9.4 via MacPorts

Posted by: Bruce Snyder on October 15, 2014

After reading the blog post from EnterpriseDB about how Postgres Outperforms MongoDB, and because I have always preferred PostgreSQL to other databases, I had to check out the document handling capabilities that PostgreSQL has added recently.

Because I began using a newer computer this summer, I had not yet installed PostgreSQL. So I pulled up a previous post about installing PostgreSQL using MacPorts and did some searches to find the latest PostgreSQL. Below are the commands I ran.

First, I needed to figure out what the latest version of PostreSQL is in MacPorts:

This allowed me to see that PostgreSQL 9.4 beta2 is the latest version supported by MacPorts. So I embarked upon an installation of this version:
This install went off without a hitch, so I created a directory for the database and initialized the database:
From the ouptput of the installation, I copy/pasted the startup command and sent it to a file. I did the same for both the start and stop commands so that I have scripts to start and stop PG quickly:
After starting up PG for the first time, I opened another terminal in another tab to watch the log file to see if the database was started correctly:
Then I pulled up the docs via the local install of them (file:///opt/local/share/doc/postgresql94/html/index.html) and started digging into the document database support to play around.
Bruce Snyder

About Bruce Snyder

Bruce Snyder has a unique skill set with a deep background in software architecture and engineering and the ability to liaise with the business side. With nearly 20 years of professional experience in enterprise and open source software, Bruce has a passion for creative problem solving, a strong work ethic and the ability to bridge the gap between business leaders and software development teams.

Bruce is a member of the Apache Software Foundation and has worked on several Apache projects. He has also authored books on Apache ActiveMQ, the Spring Framework, Apache Maven and Apache Geronimo, spoken at numerous software conferences and has helped to build communities around open source software.