How to Install PostgreSQL 9.6 on Linux Mint 18.1 Serena
Question
How to install PostgreSQL 9.6 on Linux Mint 18.1 Serena?
Answer
The PostgreSQL Global Development Group (PGDG) maintains an APT repository of PostgreSQL packages for Debian and Ubuntu located at http://apt.postgresql.org/pub/repos/apt/
What's currently supported:
- Debian 7 (wheezy), 8 (jessie), 9 (stretch), and unstable (sid)
- Ubuntu 14.04 (trusty), 16.04 (xenial), 17.04 (zesty)
- Architectures: amd64 (64-bit x86), i386 (32-bit x86), ppc64el (little-endian 64-bit POWER; not on wheezy/precise)
- PostgreSQL 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 10devel
- Server extensions such as Slony-I, various PL languages, and datatypes
- Applications like pgadmin3, pgbouncer, and pgpool-II
As Linux Mint 18.1 is based on Ubuntu 16.04 (xenial), here's the installation steps:
-
Create a file at
/etc/apt/sources.list.d/postgresql.list
with the following command:$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
- Import repository key:
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
- Update apt-get:
$ sudo apt-get update
$ sudo apt-get upgrade
- Install PostgreSQL 9.6:
$ sudo apt-get install postgresql-9.6
- Change postgres user password:
$ sudo su - postgres
$ psql
postgres=# ALTER USER postgres WITH PASSWORD 'some-secret-password';
ALTER ROLE
postgres=# \q
- Optional: Install PostgreSQL GUI client - pgadmin3:
$ sudo apt-get install pgadmin3
Reference
https://wiki.postgresql.org/wiki/Apt
Thank you for the auspicious writeup. It in fact was a amusement account it.
Look advanced to far added agreeable from you! However, how could we communicate?