首页 > 系统服务 > 详细

selinux

时间:2015-02-04 16:02:55      阅读:223      评论:0      收藏:0      [点我收藏+]

Selinux是Redhat/CentOS系统特有的安全机制。所以装完系统,我们一般都要把selinux关闭,以免引起不必要的麻烦。关闭selinux的方法为,使 “SELINUX=disabled”, 默认为 enforcing

[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=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

保存该配置文件后,重启机器方可生效,临时关闭selinux的命令为:

[root@localhost ~]# setenforce 0

我们可以使用 getenforce 命令获得当前selinux的状态:

[root@localhost ~]# getenforce
Disabled

阿铭的selinux早就关闭了,默认会输出 “enforcing” , 当使用 setenforce 0 这个命令后,再 getenforce 会输出 “permissive”

selinux

原文:http://www.cnblogs.com/yuankaituo/p/4272484.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!