Upgrade PostgreSQL 9.3 on Debian 7 Wheezy

Setup current Debian version

Version 9.1 is the current PostgreSQL version in Debian Wheezy (the time of writing this article). Installation is simple:
apt-get install postgresql

Setup latest PostgreSQL version on Debian

  1. Add the PostgreSQL Apt Repositorycreate a Debian sources list file (e.g. pgdg.list)
    nano /etc/apt/sources.list.d/pgdg.list
    add the following line and save the file
    deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main
  2. Import the repository signing key
    wget https://www.postgresql.org/media/keys/ACCC4CF8.asc
    apt-key add ACCC4CF8.asc
  3. Update the package lists
    apt-get update
  4. Finally, install PostgreSQL as usual
    apt-get install postgresql
  5. You may install another version (e.g. 9.2), using:
    apt-get install postgresql-9.2

One Comment

  1. If you enconter the error:

    You need to install:

    please replace 9.4 correspondly.

发表评论