How to Install PostgreSQL on Ubuntu Gutsy Gibbon (7.10)

Useful and simple guide, step by step.

Installing postgresql (8.2)

sudo apt-get install postgresql-8.2

Setting up the password for postgres’ postgres user

sudo -u postgres psql template1
ALTER USER postgres WITH PASSWORD 'your-password';

Configure postgres’ authentication method :

sudo cp /etc/postgresql/8.2/main/pg_hba.conf /etc/postgresql/8.2/main/pg_hba.conf_bak
sudo nano /etc/postgresql/8.2/main/pg_hba.conf

Add the following at the bottom of the file

# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
host    all         all    password

Restart postgres:

sudo /etc/init.d/postgresql-8.2 restart

4 Comments on “How to Install PostgreSQL on Ubuntu Gutsy Gibbon (7.10)”

  1. Svet says:

    Quite goood article. Simple short straight to the point and most of all it actually works :-). Now it would be nice if you also mention about adding the current user as a power DB user so it wil just be good :-)
    something like
    sudo -i
    su postgres

  2. nanungnurzula says:

    very very good

  3. leo says:

    awesome, works for 8.3 too if you replace 8.2 with the appropriate number :)

  4. nicola says:

    Not so far I have found new cool tool to work with postgresql on ubuntu – Valentina Studio. Its free edition can do things more than many commercial tools!!
    I very recommend check it.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s