您好,登錄后才能下訂單哦!
小編給大家分享一下postgresql設(shè)置服務(wù)端監(jiān)聽的方法,希望大家閱讀完這篇文章后大所收獲,下面讓我們一起去探討吧!
配置步驟:
一、修改服務(wù)端/opt/PostgreSQL/9.3/data/postgresql.conf文件
#listen_address='localhost'
改成
listen_address='*'
二、修改/opt/PostgreSQL/9.3/data/gp_hba.conf文件
在"# IPv4 local connections:"下面增加一行:
# TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 trust #Added by goopand host all all 192.168.56.1/32 trust #Another entry host all all 0/0 md5 # IPv6 local connections: host all all ::1/128 trust # Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres trust #host replication postgres 127.0.0.1/32 trust #host replication postgres ::1/128 trust
三、重啟PG服務(wù)
$ cd /opt/PostgreSQL/9.3/bin $ ./pg_ctl restart waiting for server to shut down.... done server stopped server starting [postgres@inspA bin]$ LOG: database system was shut down at 2014-10-28 16:14:53 CST LOG: database system is ready to accept connections LOG: autovacuum launcher started
看完了這篇文章,相信你對postgresql設(shè)置服務(wù)端監(jiān)聽的方法有了一定的了解,想了解更多相關(guān)知識,歡迎關(guān)注億速云行業(yè)資訊頻道,感謝各位的閱讀!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。