centos7用命令关闭防火墙
今天要安装Navicat,先关闭centos的防火墙,但是报错了。。
service iptables stop
Redirecting to /bin/systemctl stop iptables.service
Failed to stop iptables.service: Unit iptables.service not loaded.
#service iptables status
Redirecting to /bin/systemctl status iptables.service
iptables.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
后来知道原来centos7的防火墙不是这样关的。
使用systemctl即可解决
systemctl stop firewalld # 关闭防火墙
systemctl status firewalld # 查看防火墙状态
systemctl disable firewalld # 永久关闭防火墙,重启后,防火墙不会自动启动
systemctl enable firewalld # 开启防火墙