PostgreSQL on Mac can be installed very easily either by downloading and simply double clicking to install it or you can install with few lines of commands. As most of our Cloud Based Apps today depends on PostgreSQL, it is quite important part of your Mac’s localhost installation. At the time of publishing this article on installing PostgreSQL on Mac OS X Easily, we are using OS X 10.8.2 – that is the latest and updated version. It is not Mac OS X anymore but OS X. For easy understanding, we have used PostgreSQL Mac OS X instead of OS X. Please ignore this small technical point.
PostgreSQL on Mac OS X : Before You Begin
If you are still fighting with the new iTerm missing, many command missing Terminal of 10.8.2, you need to fix it. Furthermore you must ‘decorate’ it with ZSH instead of Bash and syntax highlighting. You can obviously omit these steps, still they are worthy and yummy to look :
- First, read how to Customize iTerm2 with Color Schemes, Syntax Highlighting.
- Second, fix the commands - Fixing UNIX Commands After OSX 10.8 Updates, as far I can recall, many normal commands were not working before the fix.
- Third important point is, how to access the root of OS X. You can not use su in ZSH on iTerm2, it might mess up things.
PostgreSQL on Mac OS X Easily
Perhaps you are an advanced user, you need not the help on command line. If you need, please search this website for more guides on command line and Git for UNIX or UNIXoides. OS X is technically full UNIX now. Returning to our main motto - PostgreSQL on Mac OS X. Practically that is itself of few lines. If you want the click and install app, you can download and install from here :
Please keep in mind, you need to allow non App Store app to get installed on your system.
The command is easy if you want to install from CLI :
brew install postgresql
It will work for those who are using PostgreSQL for the first time in (Mac’s) life. If its an update, its a bit painful. You need to remove the older first. Russell Brooks has excellent guide for that part, it is valueless to write the same things :