Share this page: Follow me to be notified of new articles:

Step by step PostgreSQL 9.5 installation instructions for Debian/Ubuntu servers

Introduction

PostgreSQL 9.5 was released on 01/07/2016. More information about the release is available on the official PostgreSQL documentation.
Install PostgreSQL 9.5
Install PostgreSQL 9.5 step by step

Install wget & ca-certificates and trust PostgreSQL's key

apt-get update
apt-get -y install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

Add the PostgreSQL repository to your sources

echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list

Install PostgreSQL 9.5

apt-get update
apt-get -y install postgresql-9.5

Connection to PostgreSQL

su postgres
psql
Last update of this page: March 27, 2017
Please do not copy any of the content of this website without asking me first.