This 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
- Install dependencies:
Open Terminal and execute the following commands:sudo apt-get update sudo apt-get -y install python-software-properties
- Add PostgreSQL 9.4 repository
Depending on the Linux Distribution you are using execute the following commands.
For Ubuntu:
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
For Linux Mint:
sudo -s bash <(cat /etc/os-release; echo 'echo ${VERSION/*, /}') | head -n1 | awk '{print "deb http://apt.postgresql.org/pub/repos/apt/",tolower($1)"-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
- Install PostgreSQL 9.4 using aptitude
Now that you have added the repository, it is time to install PostgreSQL 9.4sudo apt-get install postgresql-9.4 pgadmin3
- 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]
1 comment
[…] 9.4 is also available, click here to know how to install it on […]