How to Install PostgreSQL 9.4 in Ubuntu / Linux Mint

install postgresql 9.4 in Ubuntu / Linux MintThis post aims at documenting the complete installation and basic configuration of PostgreSQL 9.4 on an Ubuntu or Linux Mint OS in layman’s terms. This is tested in Ubuntu 14.04.3 LTS and Linux Mint 17.2 Rafaela and should work on other releases also.

How to install PostgreSQL 9.4 Server and PGAdmin3 on a clean Ubuntu / Linux Mint OS

  1. Install dependencies:
    Open Terminal and execute the following commands:

    sudo apt-get update
    sudo apt-get -y install python-software-properties
  2. Add PostgreSQL 9.4 repository
    Depending on the Linux Distribution you are using execute the following commands.
    For Ubuntu:

    sudo sh -c 'echo "deb $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
    wget --quiet -O - | sudo apt-key add -
    sudo apt-get update

    For Linux Mint:

    sudo -s
    bash <(cat /etc/os-release; echo 'echo ${VERSION/*, /}') | head -n1 | awk '{print "deb",tolower($1)"-pgdg main";}' > /etc/apt/sources.list.d/pgdg.list
    wget --quiet -O - | sudo apt-key add -
    sudo apt-get update
  3. Install PostgreSQL 9.4 using aptitude
    Now that you have added the repository, it is time to install PostgreSQL 9.4

    sudo apt-get install postgresql-9.4 pgadmin3
  4. Configure PostgreSQL 9.4
    Further steps are documented here: How to Configure PostgreSQL to Use with Terminal and PgAdmin3 Properly
    After completing the steps mentioned in above link you can use PostgreSQL 9.4 either through Terminal or GUI – PGAdmin3.

If you want to install an older version of PostgreSQL follow these tutorials:

 How to: Install PostgreSQL 9.3 on Ubuntu – Complete Guide

 How to Install PostgreSQL 9.2 + PostGIS 2.0 in Ubuntu

 How to: Install PostGIS 2 for PostgreSQL 9.3 on Ubuntu [Guide]

The following two tabs change content below.

Vipin Raj

Vipin Raj is a web developer specialized in PostgreSQL Database and Data Modeling, the man behind technobytz and a tech enthusiast. Having 3+ years of experience in the IT industry, he is currently pursuing his masters in computer science and information security. He spend his free time writing blog posts with the intension of sharing his knowledge to the tech community.
Vipin Raj tagged this post with: Read 31 articles by

One Comments

Leave a Reply

Your email address will not be published. Required fields are marked *


Find someting


Stay Connected

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 24 other subscribers