It is quite easy to install the latest version of Postgres on Ubuntu. First, declare Postgres repository, create the file /etc/apt/sources.list.d/pgdg.list like this :
1 |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' |
Import the repository signing key, and update ubuntu package lists
1 2 |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update |
Then install latest postgresql (actually version 11) and its latest GUI pgadmin (actually version 4) :
1 |
sudo apt install postgresql-11 pgadmin4 |
Postgresql is now running, you can check that by…