Download Postgresql 9.6 for Mac

How to install PostgreSQL 9.six on Mac OS X (10.7 or later)

PostgreSQL is an open source relational database system that has been around for well over a decade and has proven to exist a great all around storage choice when developing a spider web application.

In this guide nosotros are going to walk through installing PostgreSQL 9.6 on Mac Bone X (10.vii or later) so that we tin eventually start using information technology with a Become application, but you lot can follow forth with this guide to ready Postgres for utilize with pretty much anything, including Rails, Django, or Become.

In one case we have Postgres setup we will likewise look at adding all of the executables to our path so that we tin can type things like psql in the terminal in order to access Postgres. It is important to note that this step IS NOT required to use postgres, just it is nice to have so I suggest doing information technology.

Installation

The first thing we want to do is install PostgreSQL using Postgres.app. You can find that here: http://postgresapp.com/.

Postgres.app is about 50mb, and is by far the easiest mode to setup Postgres on a Mac. It runs like whatever other yous would download, tin can automatically start up with your Mac, and allows united states of america to skip a lot of command line steps that used to exist required to set up Postgres on a Mac. Yay for progress!

You can grab whatever version you need at the "Other versions" section of the page, just I volition be using thursday emost recent version which currently uses PostgreSQL 9.half-dozen.0.

In one case you lot have unzipped the download you lot volition desire to copy the Postgres app to your Applications folder and and so open it. You might be asked if you lot want to open this awarding because it was downloaded from the internet. Click open.

Y'all should now accept Postgres running locally, and you lot should see a piddling elephant icon on the top right section of your menu bar. Click on it and and so click the "Open psql" option.

Opening psql via the elephant icon.

If you don't run into whatsoever errors that means everything is working! Congrats!

Now lets go alee and add together Postgres to our path.

Enabling Postgres command line tools

If you are using the default terminal, yous are going to want to modify the file at ~/.bash_profile. If you lot are using something similar Oh My Zsh you are going to want to modify the file ~/.zshrc.

To edit this file y'all likely need to open it via the terminal, so open your final and type open ~/.bash_profile. You can supersede the word open with subl or whatever text editor you adopt.

Once your zbash_profile or .zshrc file is open, add the post-obit line to the end of the file:

                                      export              PATH              =$              PATH              :              /              Applications              /              Postgres              .              app              /              Contents              /              Versions              /              latest              /              bin                      

After that you will need to quit and restart your terminal This is to brand sure it reloads with the changes you just made.

In one case you lot have restarted your final, try running psql.

You should get the post-obit output.

                                      psql              (              9              .              6              .              0              )                                      Type              "assist"              for              assistance              .                                                              postgres              =#                      

Yous have now successfully continued to Postgres using the postgres role. This function doesn't require a password because Postgres is only accessible locally, then it is unlikely to present any security issues.

Up Next…

Now that yous accept PostgreSQL 9.6 installed you are fix to start using information technology! Check out the next article in this series to learn how to do that - Creating PostgreSQL databases and tables with raw SQL

You can also check out an overview of the entire series, forth with links to each commodity in the serial, by going here - Using PostgreSQL with Golang.

Learn Spider web Development with Go!

Sign upward for my mailing list and I'll transport yous a Free sample from my course - Spider web Development with Go. The sample includes 19 screencasts and the first few capacity from the book.

You will also receive emails from me about Go coding techniques, upcoming courses (including Costless ones), and grade discounts.

©2018 Jonathan Calhoun. All rights reserved.

Download Postgresql 9.6 for Mac

Posted by: blairaforessind.blogspot.com