28 September 2014

Installing PostgreSQL 9.4 beta2 on Mac OS X 10.9.4 via MacPorts

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.

No comments:

Post a Comment