PostgreSQL服务端监听设置

前端之家收集整理的这篇文章主要介绍了PostgreSQL服务端监听设置前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

配置步骤:

一、修改服务端/opt/Postgresql/9.3/data/postgresql.conf文件

#listen_address='localhost'

改成

listen_address='*'

二、修改/opt/Postgresql/9.3/data/gp_hba.conf文件

在"# IPv4 local connections:"下面增加一行:

#TYPEDATABASEUSERADDRESSMETHOD

#"local"isforUnixdomainsocketconnectionsonly
localallalltrust
#IPv4localconnections:
hostallall127.0.0.1/32trust

#Addedbygoopand
hostallall192.168.56.1/32trust
#Anotherentry
hostallall0/0md5

#IPv6localconnections:
hostallall::1/128trust
#Allowreplicationconnectionsfromlocalhost,byauserwiththe
#replicationprivilege.
#localreplicationpostgrestrust
#hostreplicationpostgres127.0.0.1/32trust
#hostreplicationpostgres::1/128trust

三、重启PG服务

$cd/opt/Postgresql/9.3/bin
$./pg_ctlrestart

waitingforservertoshutdown....done
serverstopped
serverstarting
[postgres@inspAbin]$LOG:databasesystemwasshutdownat2014-10-2816:14:53CST
LOG:databasesystemisreadytoacceptconnections
LOG:autovacuumlauncherstarted

猜你在找的Postgre SQL相关文章