Tuesday, November 8, 2011

Installing PostgreSQL 9.1 on Ubuntu 11.04

first install python-software-properties:
sudo apt-get install python-software-properties

now add repository and update apt.
sudo add-apt-repository ppa:pitti/postgresql
sudo apt-get update

now instal postgresql
sudo apt-get install postgresql-9.1 libpq-dev

Now change the postgres user password (still running as root):
su postgres
psql -d postgres -U postgres
alter user postgres with password 'a';
\q

To install GUI client pgsql
sudo apt-get install pgadmin3

10 comments:

  1. wanted to thank you for posting this. worked like a charm

    ReplyDelete
  2. Somehow still asking for password for postgres but does not accept any password, maybe it is still somewhere as some default password.

    ReplyDelete
    Replies
    1. There are two passwords for user postgres, one for the database and one for the system in general. If you don't change the default authentication mode in pg_hba.conf you always have to be the postgres user to be able to connect to the database. Or you could pass in the command line argument to ask for the password, I think is -w.

      Delete
    2. This comment has been removed by the author.

      Delete
  3. Thanks a lot, this helped me >]

    ReplyDelete
  4. Very handy - cheers mate :-)

    ReplyDelete
  5. Thanks a lot ....really really help me

    ReplyDelete
  6. Спасибо, друг!

    ReplyDelete
  7. Thanks a lot. very useful post

    ReplyDelete