centos7查看端口是否开放
1、centos7中的防火墙改成了firewall,使用iptables无作用,开放端口的方法如下:firewall-cmd --zone=public --add-port=80/tcp --permanent返回success为成功

3、重启防火墙:systemctl restart firewalld.service

5、查看监听(Listen)的端口netstat -lntp

1、centos7中的防火墙改成了firewall,使用iptables无作用,开放端口的方法如下:firewall-cmd --zone=public --add-port=80/tcp --permanent返回success为成功
3、重启防火墙:systemctl restart firewalld.service
5、查看监听(Listen)的端口netstat -lntp