As we all know, PostgreSQL is a free object-relational database server (database management system), is a free-to-use open source database system. In this paper, the PostgreSQL database server monitoring settings and client connection methods are described in detail as follows:
First, Background introduction:
The PostgreSQL server in this article is running on Redhat Linux with IP: 192.168.230.128
The client is installed on Windows XP and the IP is: 192.168.230.1
Second, the configuration method:
1. Modify the server-side/etc/postgresql/9.5/main/postgresql.conf file to:
|
#listen_address=‘localhost‘ |
Change into
2. Modify the/etc/postgresql/9.5/main/gp_hba.conf file:
In which you increase the IP of the client, as follows, note the last line:
|
# TYPEDATABASEUSERCIDR-ADDRESS METHOD#"local"isforUnix domain socket connectionsonlylocalallalltrust# IPv4localconnections:host allall127.0.0.1/32 trust# IPv6localconnections:host allall::1/128 trust#kevinadd# IPv4localconnections:host allall192.168.230.1/32 trust |
3. Restart the PG service:
|
[[email protected] data]$ pg_ctl restartwaitingforservertoshut down....LOG: received smart shutdown requestLOG: autovacuum launcher shutting downLOG: shutting downLOG:databasesystemisshut down doneserver stoppedserver starting[[email protected] data]$ LOG:databasesystem was shut downat2011-07-09 14:54:29 CSTLOG: autovacuum launcher startedLOG:databasesystemisreadytoaccept connections[[email protected] data]$ |
4. Using a client connection, configure the following:
5. Click "OK" to connect, after successful, the following:
PostgreSQL database server listener settings and Client connection method tutorial