questions - Question:Install PostgreSQL 8.4 on Ubuntu 10.10

PostgreSQL is a database management system relational database and object-oriented free, released under the BSD license.

To install from Ubuntu to run in console the following line:

sudo apt-get install postgresql postgresql-client pgadmin3

This installs the engine and pgadmin3 client, a graphical tool to manage databases.
The next thing is to change the administrator password system PostgreSQL:

sudo passwd postgres

Now we must change the password of "user postgres" on the engine, it first entered with the following line:

psql -h localhost -U postgres -W template1

and then enter the following command:

ALTER USER postgres WITH PASSWORD 'password';

Finally out of postgres, enter the following command:


With this we have installed PostgreSQL. Settings
We set up remote access to our motor. This step is optional, only if you want to allow access to our server from other hosts.
First we edit the file postgresql.conf:

sudo gedit /etc/postgresql/8.4/main/postgresql.conf

Look for the line:

# Listen_addresses = 'localhost'

and change it to:

listen_addresses = '*'

We also look for the following line:

# Password_encryption = on

and change it to:

password_encryption = on

Now we edit the file "pg_hba.conf"

sudo gedit /etc/postgresql/8.4/main/pg_hba.conf


Modify the lines:

# Database administrative login by UNIX sockets
local   all         postgres                          ident


# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 remote connections:
host    all         all          md5
# IPv4 local connections:
host    all         all          md5
# IPv6 local connections:
host    all         all         ::1/128               md5

We do this to use MD5 authentication with the user postgres.

Finally sent to restart:

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

asked Sep 13, 2013 in LINUX by rajesh
edited Sep 12, 2013
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.