文章分类

当前位置:首页>文章中心>行业资讯>centos服务器关闭selinux及防火墙

centos服务器关闭selinux及防火墙

发布时间:2019-06-30 点击数:1065

centos6

/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
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
在线客服