I am Dmitri Moore, a full stack architect and hands-on coder. I've been programming
for almost 2 decades now and saw many frameworks going from
super popular to fairly forgotten. So far, PKAN is my favorite stack:
Let's see how long this one is gonna stick around.
How to Install PostgreSQL 9 DB on Mac OS X Mavericks with Homebrew
January 16, 2014
Just moved from MySQL to PostgreSQL for the new rails apps. I think it is time I try
something new after being so faithful to MySQL DB for the past X years. My first PostgreSQL
install didn’t go as smooth as I expected, but wasn’t too bad. Here is a summary of the installation
steps that worked for me (assuming you are using the awesome Homebrew package
manager).
Uninstall Previous Version of PostgreSQL (if any)
If you’d like to do a fresh re-install of PostgreSQL DB existing version can be uninstalled this way.
Make sure to export all of your data from the existing database prior
to executing steps below or it will be deleted!
Install PostgreSQL DB with Homebrew
At this point the PostgreSQL DB server is installed and ready to start. Config file is located
at /usr/local/var/postgres/postgresql.conf
Managing PostgreSQL with Lunchy Gem
I recommend installing this gem to simplify starting and stopping PostgreSQL server:
Testing PostgreSQL Installation
Make sure the server is running, then execute commands below. You should see:
which returning Homebrew’s version of psql file located at /usr/local/bin/psql; and
\l reporting postgres db with user (or “role” as postgres calls it) being set to your current
shell user (e.g. “dmoore” in my case).