在Linux中EL代表RedHat Enterprise Linux
查看操作系统版本的命令:
uname -a
在EL6版本下,得到的结果可能是这样的:
在EL7版本下,得到的结果可能是这样的:
在EL6下,关闭防火墙的命令:
service iptables stop
/etc/init.d/iptables stop
在EL7下,关闭防火墙的命令:
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service
第三个命令是查看防火墙服务的状态,防火墙关闭后执行这个命令,显示的内容大概是这样:
注:
systemctl是EL7用来管理系统服务的命令,功能比较强大。