码迷,mamicode.com
首页 > 系统相关 > 详细

永久关闭selinux | 防火墙

时间:2017-08-31 19:45:12      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:emc   服务器   set   enforce   生效   需要   htm   ros   body   

关闭SELinux的两种方法

1 永久方法 – 需要重启服务器

修改/etc/selinux/config文件中设置SELINUX=disabled ,然后重启服务器。

2 临时方法 – 设置系统参数

使用命令setenforce 0

附:
setenforce 1 设置SELinux 成为enforcing模式
setenforce 0 设置SELinux 成为permissive模式

谢谢!

CentOS 7.0默认使用的是firewall作为防火墙,使用iptables必须重新设置一下

1、直接关闭防火墙

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall开机启动

最后重启系统使设置生效即可。

谢谢

 

永久关闭selinux | 防火墙

标签:emc   服务器   set   enforce   生效   需要   htm   ros   body   

原文地址:http://www.cnblogs.com/linux-186/p/7460091.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!