3.1、修改postgresql.conf# vi /opt/app/postgresql/data/postgresql.conf

文章插图
注: 取消 listen_addresses 的注释 , 将参数值改为“*”3.2、修改pg_hba.conf
# vi /opt/app/postgresql/data/pg_hba.conf
文章插图
注: 找到host all all 127.0.0.1/32 trust这行 , 然后在下面添加一行:host all all 0.0.0.0/0 trust即可3.2、重启服务
# bin/pg_ctl -D /opt/app/postgresql/data -l /opt/app/postgresql/logs/logfile restart或# service postgresql restart三、配置防火墙4.1、开启5432端口# firewall-cmd --zone=public --add-port=5432/tcp --permanent # 开放5432端口# firewall-cmd --zone=public --remove-port=5432/tcp --permanent #关闭5432端口#配置立即生效# firewall-cmd --reload #重启防火墙# service firewalld restart #查看已开放的端口# firewall-cmd --list-ports
推荐阅读
- Linux搭建DNS服务器
- Jpom - 简而轻的低侵入式的部署运维系统
- Linux是实时系统还是分时操作系统?
- Linux|RTX 30系显卡彻底沦陷 算力破解更完美了:Windows/Linux双线攻克
- Windows Server 2016部署域控制器
- Linux系统如何解压rar文件
- PC电脑|同方公布自主PC电脑:8核国产CPU、通吃Win/Linux/安卓三大系统
- Linux之iptables防火墙
- PostgreSQL数据库体系架构
- Linux环境下部署nfs
