Official website: https://www.postgresql.org/download/linux/ubuntu/
--------------------------------------------------------------------------------------------------------------- -----
Another article, which is about the same:
http://tecadmin.net/install-postgresql-server-on-ubuntu/#
PostgreSQL is an open source object-relational database system. It is one of the leading database server used for production servers. PostgreSQL allows us to execute stored procedures in various programming languages, like C/C + +, Python, Java, Perl, Ruby a nd its own pl/pgsql, which are similar to Oracle PL/SQL
This article would help you to installing PostgreSQL database server on your Ubuntu systems.
Step 1:add PostgreSQL Apt Repository
PostgreSQL packages is also available in default Ubuntu repository, if I try to install PostgreSQL on Ubuntu 12.04 I only found PostgreSQL 9.1 is in default apt repository. So I request your to add PostgreSQL apt repository first in your system suggested on official PostgreSQL website using foll Owing command.
$ sudo sh-c ' echo ' deb http://apt.postgresql.org/pub/repos/apt/' Lsb_release-cs '-pgdg main ' >>/ETC/APT/SOURCES.L Ist.d/pgdg.list ' $ wget-q Https://www.postgresql.org/media/keys/ACCC4CF8.asc-O-| sudo apt-key add-
Step 2:install PostgreSQL
Now as we had added PostgreSQL official repository in our system, first we need to update repository list. After the install Latest PostgreSQL Server in our Ubuntu system using following commands.
$ sudo apt-get update$ sudo apt-get install PostgreSQL postgresql-contrib
Step 3:connect to PostgreSQL
After installing PostgreSQL database server, by default it creates a user ' postgres ' with role ' postgres '. It also creates a system account with same name ' Postgres '. So-connect to Postgres server, login to your system as user Postgres and connect database.
$ sudo su-postgres$ psql
Now is logged in to PostgreSQL database server. To check the login info use following command from database command prompt.
postgres-# \conninfo
To disconnect from PostgreSQL database command prompt just type below command and press ENTER. It'll return you to Ubuntu command prompt.
postgres-# \q
Your PostgreSQL installation has been completed successfully. Let's move to phppgadmin installation of Ubuntu systems.
Ubuntu 14.04 Install PostgreSQL latest version