Background introduction:
PostgreSQL server execution on Redhat linux, IP: 192.168.230.128
Client is installed on Windows XP with IP: 192.168.230.1
Configuration method:
1. Change the server/opt/postgresql/data/postgresql.conf file to
#listen_address = ' localhost ' changed to listen_address= ' * '
2. Change the/opt/postgresql/data/gp_hba.conf file
Add the client's IP, for example the following, and note the last line:
# TYPE DATABASE USER cidr-address method# "Local" is a for Unix domain socket connections onlylocal All trust# IPv4 local connections:host all 127.0.0.1/32 trust# IPv6 Local Connections:host All :: 1/128 trust#kevin add# IPv4 local connections:host all All 192.168.230.1/32 Trust
3. Restart the PG service
[Email protected] data]$ pg_ctl restartwaiting for server to shut down .... LOG: received smart shutdown Requestlog: autovacuum Launcher shutting Downlog: shutting Downlog: Database system is shut down Doneserver stoppedserver starting[[email protected] data]$ LOG: database system was shut Down at 2011-07-09 14:54:29 cstlog: autovacuum launcher startedlog: database system was ready to accept connections [Email protected] data]$
4. Using the client connection, configure for example the following:
5. Click "OK" to connect, after success, such as the following:
PostgreSQL server monitoring settings and client connection methods