Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Debian 8 - Install PostgreSQL 9.x

From Debian Packages (9.4)

sudo apt-get install postgresql-9.4 -y

The output of psql -V will show you version 9.4.9.

PostgreSQL Apt Repository (9.6)

Use this method if you need the latest release (9.6) which brings with it features like support for parallel queries.

echo 'deb jessie-pgdg main' | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.6 -y


You now have a working PostgreSQL database. You may now wish to configure PostgreSQL to set a password and allow remote connections, or you can dive right in and refer to the cheatsheet for help.


Last updated: 3rd September 2023
First published: 16th August 2018