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 http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.6 -y

Conclusion

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.

References

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

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch