設定ファイル「pg_hba.conf」で認証方法を設定
※「host」と各「all」の定義はこのファイルのコメントに記載されています。
下記の設定で、
・TCP/IPで
・すべてのデータベースへ
・すべてのユーザから
・すべてのアドレスから
・「trust」という認証方法で
接続可能になります。
pg_hba.conf
・・・(略)・・・
# IPv4 local connections:
host all all all trust
・・・(略)・・・
設定ファイル「postgresql.conf」でネットワークを設定
下記の設定で
・ポート5432
・すべてのアドレス
を監視するになります。
postgresql.conf
・・・(略)・・・
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
port = 5432 # (change requires restart)
・・・(略)・・・
ファイアウォールの設定
[root@centos7 data]# firewall-cmd --add-service=postgresql --zone=public --permanent
success
[root@centos7 data]# firewall-cmd --reload
success