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

SELinux开启与关闭

时间:2016-07-21 14:32:51      阅读:314      评论:0      收藏:0      [点我收藏+]

标签:

SELinux是「Security-Enhanced Linux」的简称,是美国国家安全局「NSA=The National Security Agency」 和SCC(Secure Computing Corporation)开发的 Linux的一个扩张强制访问控制安全模块。原先是在Fluke上开发的,2000年以 GNU GPL 发布。

大部分使用 SELinux 的人使用的都是 SELinux 就绪的发行版,例如 Fedora、Red Hat Enterprise Linux (RHEL)、Debian或 Centos。它们都是在内核中启用 SELinux 的,并且提供一个可定制的安全策略,还提供很多用户层的库和工具,它们都可以使用 SELinux 的功能。

 

SELinux的相关配置操作如下

  • 查看开启状态如何
(方法1)/usr/sbin/sestatus -v
(方法2)getenforce
  • 不关机临时变更状态为关闭
setenforce 0
  • 需要关机永久变更状态为关闭,将SELINUX从enforcing变更为disabled
[root@localhost ~]# vim /etc/selinux/config


# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

 

SELinux开启与关闭

标签:

原文地址:http://www.cnblogs.com/tdcqma/p/5691320.html

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