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

CentOS7 关闭selinux

时间:2018-06-14 14:28:14      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:its   centos   hat   current   str   therefore   OWIN   miss   vim   

SELinux, an abbreviation of Security-Enhanced Linux, is a security enhancement to the Linux operating system. It is a labeling system that blocks many system functions in its default configuration.

SELinux is very useful for some users, but due to its administrative overhead, you may be better off simply disabling it. The time spent adding rules and updating permissions on SELinux versus the added security benefit may not be worth it.

First check if SELinux is disabled or enabled:

sestatus

If this command returns "SELinux status: enabled", you can disable SELinux with the following command.

setenforce 0

The command above will only disable SELinux for now, but the change will be reverted across reboots. Therefore, disable it permanently by opening the file /etc/sysconfig/selinux and replace the current SELINUX directive with a value of disabled so it looks like this:

vim /etc/sysconfig/selinux
SELINUX=disabled

Check the SELinux status again to make sure that it has been properly disabled.

sestatus

CentOS7 关闭selinux

标签:its   centos   hat   current   str   therefore   OWIN   miss   vim   

原文地址:https://www.cnblogs.com/lionetchen/p/9182438.html

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