Skip to content

Instantly share code, notes, and snippets.

@techkuz
Last active May 2, 2018 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techkuz/77f1a18d119a6394a7e20ef9e6f8d15a to your computer and use it in GitHub Desktop.
Save techkuz/77f1a18d119a6394a7e20ef9e6f8d15a to your computer and use it in GitHub Desktop.
Install PostgreSQL 10 on Ubuntu

Install PostgreSQL 10 on Ubuntu

This is a quick guide to install PostgreSQL 10 - tested on Ubuntu 16.04

Add PostgreSQL apt repository

The current default Ubuntu apt repositories (up to 02.05.2018) only have up to postgresql-9.5. To get 10, we'll add the official postgres apt repository.

  • Ubuntu 16.04: sudo add-apt-repository 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main'

Now import the repository signing key, followed by an update to the package lists:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
  sudo apt-key add -
sudo apt-get update

Install PostgreSQL

sudo apt-get install postgresql-10

Ensure that the server is started:
sudo service postgresql status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment