Install Postgres 9.1 on Ubuntu 10.04 (LTS)

Posted on Wednesday, April 11, 2012



I recently had to install postgres 9.1 on Ubuntu 10.04 server.  Currently it is not available via apt-get.  

So poking around I found 2 good sites showing how to accomplish this task  http://netadminlinux.blogspot.com/2011/11/installing-postgresql-91-on-ubuntu-1104.html [1] and



Here are the simple steps I used to get this done in Ubuntu 10.04
(You may not need to remove postgresql, I did because I used the normal apt-get which gets you version 8.3 I think)


        > sudo apt-get remove postgresql
        >    sudo apt-get autoremove
        >    sudo apt-get install python-software-properties
        >    sudo add-apt-repository ppa:pitti/postgresql
        >    sudo apt-get update
        >    sudo apt-get install postgresql-9.1 libpq-dev




Now you can log into the Database.  And use “SHOW data_directory;” to show where the Database is being stored.


        >    sudo su postgres
        >    psql -d postgres –U postgres
        >    select version();















References
[1]  Installing PostgreSQL 9.1 on Ubuntu 11.04, 
       Visited 4/2012
[2]  Installing GeoDjango and PostGIS with Postgres 9.1 on Ubuntu 11.10
       Visited 4/2012

1 comment: