一、Postgresql使用的端口是: 5432/tcp
二、centos7防火墙默认的zone是:public
三、
- firewall-cmd –zone=public –list-ports
//查看已开放的端口 - firewall-cmd –zone=public –add-port=5432/tcp –permanent
//永久添加5432端口,必须同时设置协议,且必须添加permanent配置,否则reload后失效 - firewall-cmd –reload //重启
- systemctl stop firewalld.service //关闭防火墙
- systemctl status firewalld.service //查看防火墙状态