This tutorial shows the installation of the latest PostgreSQL 9.5 version on Ubuntu. We will use the official repository from postgresql.org, so you can update your server easily in future and get direct updates and patches from the database vendor. The steps have been tested with Ubuntu versions from 12.04 until 15.10.
Read more at HowtoForge