Linux学习笔记之Linux Centos关闭防火墙

# Centos6.x
 
/etc/init.d/iptables stop
chkconfig iptables off
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
grep SELINUX=disabled /etc/selinux/config
setenforce 0
 
# Centos7.x
 
systemctl stop firewalld.service
systemctl disable firewalld.service
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
grep SELINUX=disabled /etc/selinux/config
setenforce 0

 

posted @ 2018-11-02 00:01  时光飞逝,逝者如斯  阅读(209)  评论(0编辑  收藏  举报