# MySQL端口:
[root@localhost ~]# sh ./cmd.sh "/root/DBServerIP.txt" "root" "lri35krJF;ba" "firewall-add-port=3306/tcp --permanent"
# web端口:
[root@localhost ~]# sh ./cmd.sh "/root/WebServerIP.txt" "root" "lri35krJF;ba" "firewall-cmd --zone=public --add-port=80/tcp --permanent; firewall-cmd --zone=public --add-port=8080/tcp --permanent"
# NFS端口,客户端和服务端都需要监听:
[root@localhost ~]# sh ./cmd.sh "/root/ipAll.txt" "root" "lri35krJF;ba" "firewall-cmd --zone=public --add-port=111/tcp --permanent"
# zabbix端口:
[root@localhost ~]# sh ./cmd.sh "/root/ipAll.txt" "root" "lri35krJF;ba" "firewall-cmd --zone=public --add-port=10050/tcp --permanent" # 客户端
[root@localhost ~]# sh ./cmd.sh "/root/zabixIP.txt" "root" "lri35krJF;ba" "firewall-cmd --zone=public --add-port=10051/tcp --permanent" # 服务端
Mycat端口:
[root@localhost ~]# sh ./cmd.sh "/root/MycatIP.txt" "root" "lri35krJF;ba" "firewall-cmd --zone=public --add-port=8066/tcp --permanent; firewall-cmd --zone=public --add-port=9066/tcp --permanent"
# 重启firewall服务:
[root@localhost ~]# sh ./cmd.sh "/root/ipAll.txt" "root" "lri35krJF;ba" "systemctl stop firewalld.service; systemctl start firewalld.service"