Wednesday, December 14, 2011

Configuring PostgreSQL 9.0.4 on Slackware 13.37

After succesfully install postgresql on slackware, the next point is to configuring postgresql so it can accessing from network ( local network).

Step 1: edit postgresql.conf
#mcedit /var/lib/pgsql/data/postgresql.conf
change at the connections and authentication section, find the
listen_addresses = 'localhost' and change it to
listen_addresses = '*'
and uncomment
#port =5432 so it becomes
port = 5432
and save it.

Step 2: edit pg_hba.conf
Because i connecting postgresql server from my laptop which have ip number and some times i would like connected from another 192.168.110. ip number, so i editing pg_hba.conf like this
#mcedit /var/lib/pgsql/data/pg_hba.conf
addes this line to pg_hba.conf
host    all     all     md5

save it, and restart the postgresql server to look new configuration file.
From my window (using pgadmin 1.14.0) i set connection like this image bellow.

Click to enlarge
Then press Ok button to connect to your database server.

Click to enlarge

No comments: