OpenNetGuru

Saturday, May 19th

Last update:12:30:26 PM GMT

You are here: Network and Security Postgres SQL server insall ubuntu

Postgres SQL server insall ubuntu

E-mail Print PDF

Server install
------------------

1) sudo apt-get install postgresql

2) To enable TCP/IP connections, edit the file /etc/postgresql/8.4/main/postgresql.conf

Locate the line #listen_addresses = 'localhost' and change it to:

listen_addresses = 'localhost'


3) set a password for the postgres user

sudo -u postgres psql template1


ALTER USER postgres with encrypted password 'ffadmin';

4) After configuring the password, edit the file /etc/postgresql/8.4/main/pg_hba.conf to use MD5 authentication with the postgres user:

local   all         postgres                          md5

5) restart the service: sudo /etc/init.d/postgresql-8.4 restart

6) install doc: sudo apt-get install postgresql-doc-8.4


Cleint install
-----------------

1) sudo apt-get install postgresql-client

2) to test: psql -h localhost database_name user_name

3) to exit: \q