Friday, October 2, 2009

Installing PostgreSQL on BOSS

This tutorial is about how to installing PostgreSQL on BOSS( Bharat Operating System Solutions) Server.

just 3 step to install and remote system access to the database server

1) Install PostgreSQL
2) Change authentication method
3) Restart PostgreSQL Server

kindly go through step by step,

1) Install PostgreSQL

apt-get install postgresql

2) Change authentication method

By default, PostgreSQL database server remote access disabled for security reasons.
We need to edit file pg_hba.conf and postgresql.conf to change authentification method for accessing PostgreSQL database.


I) add IP address of the system to access the database server

vi /etc/postgresql/8.2/main/pg_hba.conf


--Append the following configuration lines to give access to 10.10.29.0/24 network:
(TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD)
host all all 10.10.29.0/24 255.255.255.0 trust

--Append the following configuration lines to give access to 192.175.45.56 system:
host all all 192.175.45.56 255.255.255.0 trust

Save and close the file.

II) If you are using PostgreSQL version 8.x or newer use the following instructions or skip to Step III for older version (7.x or older).

vi /etc/postgresql/8.2/main/postgres.conf

defaults to 'localhost', and '*' is all ip address,
Find configuration line that read as follows:
listen_addresses='localhost'
changed into like below
listen_addresses='*'

Or just bind to 202.54.1.2 and 202.54.1.3 IP address
listen_addresses='202.54.1.2, 202.54.1.3'


III) Information for old version 7.x or older

Following configuration only required for PostgreSQL version 7.x or older. Open config file, enter:
vi /etc/postgresql/8.2/main/postgres.conf

Bind and open TCP/IP port by setting tcpip_socket to true. Set / modify tcpip_socket to true:
tcpip_socket = true

Save and close the file.

3) Restart PostgreSQL Server

Type the following command:

/etc/init.d/postgresql restart

any query's mail me!

No comments: