Ubuntu – install postgres 9.4 on ubuntu 14.04-2

aptpostgresqlsoftware installation

I need to install postgresql 9.4 server but I only can find version 9.3. wit apt.

How can I install or upgrade it?

Best Answer

Install with the steps below and read the statement at the end of this answer.

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /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 upgrade

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/. We aim at building PostgreSQL server packages as well as extensions and modules packages on several Debian/Ubuntu releases for all PostgreSQL versions supported.

Currently, we support

  • Debian 6 (squeeze), 7 (wheezy), 8 (jessie) and unstable (sid) 64/32 bit (amd64/i386)
  • Ubuntu 12.04 (precise), 14.04 (trusty), 14.10 (utopic) 64/32 bit (amd64/i386)
  • PostgreSQL 8.4, 9.0, 9.1, 9.2, 9.3, 9.4
  • Server extensions such as Slony-I, various PL languages, and datatypes
  • Applications like pgadmin3, pgbouncer, and pgpool-II

Packages for older PostgreSQL versions and older Debian/Ubuntu distributions will continue to stay in the repository; updates for those will be provided on an ad-hoc basis.

Source