Tuesday, 2 September 2014

Install postgres on ubuntu 12.04

postgresql is a powerful and reliable object-relational database system. it’s a great alternative for mysql. it is as easy to set up, performs better and offers far more features.

1. make sure you already have install python-software-properties
     $sudo apt-get install python-software-properties

2.add ppa repository to my ubuntu.
     $sudo add-apt-repository ppa:pitti/postgresql

3. after adding ppa, update your system apt:
     $sudo apt-get update

4.finally install postgresql-9.1:
     $sudo apt-get install postgresql

   if you having any error, make sure you already  install libpq-dev.the libpq-dev package is for compiling   wrappers/clients against libpq.
     $sudo apt-get install postgresql-9.1 libpq-dev

5.now check it out installation is successful or…..
     $ locate postgresql

6. if done!!!, cheers …………..   check the install version.
     $psql -v

7. now let’s take look to postgres console. if you are login as root user
     $su postgres

   for other user    
     $ sudo su postgres -c psql
   now you are on postgres console

No comments:

Post a Comment