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

关闭SELinux...

时间:2017-08-19 21:11:35      阅读:279      评论:0      收藏:0      [点我收藏+]

标签:使用   模式   enforce   conf   rmi   strong   环境   lin   调试   

为了减少调试时间,快速部署服务器环境,有时我们需要暂时关闭SELinux

1.查询SELinux状态:getenforce

状态值,Enforcing,Permissive,Disabled

Enforcing: 强制模式,运行中

Permissive: 宽容模式,仅出现提示信息,一般用来debug

Disable: 关闭模式,SELinux并未运行

 

2.切换SELinux模式:setenforce

可以在Enforcing和Permissive之间互相切换

setenforce 1,切换到Enforcing

setenforce 0,切换到Permissive

 

3.SELinux的配置文件:/etc/selinux/config

除了使用setenforce切换模式,也可以在这个配置文件中进行SELinux运行模式的配置

为配置选项SELINUX指定不同的值即可,可选的值有Enforcing,Permissive,Disabled.

配置完成后重启机器即可

 

关闭SELinux...

标签:使用   模式   enforce   conf   rmi   strong   环境   lin   调试   

原文地址:http://www.cnblogs.com/ifgo/p/7397667.html

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