Linux在安装好之后通常SELinux都是出于默认开启的状态,开启的情况下会导致一些服务的安装不成功。

在不需要的情况下完全可以关闭掉,下面是在centos 7.0里面如何查看,关闭selinux。

查看selinux状态

1
2
3
4
5
6
7
8
9
10
[root@localhost ~]# sestatus  
SELinux status:                 enabled  
SELinuxfs mount:                /sys/fs/selinux  
SELinux root directory:         /etc/selinux  
Loaded policy name:             targeted  
Current mode:                   enforcing  
Mode from config file:          enforcing  
Policy MLS status:              enabled  
Policy deny_unknown status:     allowed  
Max kernel policy version:      28

临时关闭

1
[root@localhost ~]# setenforce 0

永久关闭,可以修改配置文件/etc/selinux/config,将其中SELINUX设置为disabled

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@localhost ~]# cat /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 three two values:  
#     targeted - Targeted processes are protected,  
#     minimum - Modification of targeted policy. Only selected processes are protected.   
#     mls - Multi Level Security protection.  
SELINUXTYPE=targeted
 
[root@rdo ~]# sestatus  
SELinux status:                 disabled

转载本篇文章请注明文章原出处:http://www.orcs.cc/post/6.html

centos 7.0 查看selinux状态|关闭|开启的更多相关文章

  1. centos6 查看SELinux状态 关闭SELinux

    SELinux(Security-Enhanced Linux) 是美国国家安全局(NSA)对于强制访问控制的实现,是 Linux历史上最杰出的新安全子系统.在这种访问控制体系的限制下,进程只能访问那 ...

  2. centos6 下查看SELinux状态 关闭SELinux

    转载自:https://blog.csdn.net/boomjane_testingblog/article/details/52859977 SELinux(Security-Enhanced Li ...

  3. 查看 SELinux状态|关闭SELinux

    查看SELinux状态: 1./usr/sbin/sestatus -v      ##如果SELinux status参数为enabled即为开启状态 SELinux status:         ...

  4. 查看SELinux状态&关闭SELinux

    1. 查看SELinux状态 1.1 getenforce getenforce 命令是单词get(获取)和enforce(执行)连写,可查看selinux状态,与setenforce命令相反. se ...

  5. linux下查看 SELinux状态及关闭SELinux

    SELinux全称为安全增强式 Security-Enhanced Linux(SELinux),是一个在内核中实践的强制存取控制(MAC)安全性机制.SELinux 首先在 CentOS 4 出现, ...

  6. 查看 SELinux状态及关闭SELinux

    查看SELinux状态: 1./usr/sbin/sestatus -v      ##如果SELinux status参数为enabled即为开启状态 SELinux status:         ...

  7. 查看SELinux状态并关闭SELinux

    SELinux(Security-Enhanced Linux)是Linux上最杰出的新安全子系统.在linux内核级别上提供了一个灵活的强制访问控制系统(MAC),这个强制访问控制系统是建立在自由访 ...

  8. [转] 查看 SELinux状态及关闭SELinux

    本文转载自: http://bguncle.blog.51cto.com/3184079/957315 查看SELinux状态: 1./usr/sbin/sestatus -v      ##如果SE ...

  9. 如何查看 SELinux状态及关闭SELinux

    查看SELinux状态: 1./usr/sbin/sestatus -v      ##如果SELinux status参数为enabled即为开启状态 SELinux status:         ...

随机推荐

  1. Java学习--Java 中的包装类

    Java 中的包装类 相信各位小伙伴们对基本数据类型都非常熟悉,例如 int.float.double.boolean.char 等.基本数据类型是不具备对象的特性的,比如基本类型不能调用方法.功能简 ...

  2. 设置placeholder的字体颜色

    //设置字体颜色 [self.searchTextField setValue:[UIColor colorWithRed:0.50 green:0.50 blue:0.50 alpha:1.0] f ...

  3. g2o error

    /home/lzp/slamtest/graduationcode/p3/poseestimation/pose_estimation_3d2d.cpp: In function ‘void bund ...

  4. golang 编码转化

    在网上搜索golang编码转化时,我们经常看到的文章是使用下面一些第三方库: https://github.com/djimenez/iconv-go https://github.com/qiniu ...

  5. 基于注解的简单SSH保存用户小案例

    需求:搭建SSH框架环境,使用注解进行相关的注入(实体类的注解,AOP注解.DI注入),保存用户信息 效果: 一.导依赖包 二.项目的目录结构 三.web.xml配置 <?xml version ...

  6. CakePHP Configure::read('KHCITY') 数据配置读取

    1. 2.引入 循环遍历 正确:

  7. js数组的forEach方法能不能修改数组的值

    如果要使用数组的forEach()方法对其改值时,需要直接通过arr[i]这种方式来更改. 请看下面代码: // 数组改值 let arr = [1,3,5,7,9]; arr.forEach(fun ...

  8. HTML contenteditable 属性

    contenteditable 属性是 HTML5 中的新属性,所有的主流浏览器都支持 contenteditable 属性. contenteditable 属性规定了元素内容是否可编辑. * 如果 ...

  9. js-小数计算问题

    先上图: 什么情况? 原因:js采用二进制进行小数计算 先看十进制的小数转换为二进制的方法: 十进制数的整数位是二进制数的整数位,十进制数的小数位是二进制数的小数位 假如我们有小数111.4(10), ...

  10. C语言——二叉排序树

    二叉排序树是一种实现动态查找的树表,又称二叉查找树. 二叉排序树的性质: 1. 若它的左子树不为空,则左子树上所有节点的键值均小于它的根节点键值 2. 若它的右子树不为空,则右子树上所有节点的键值均大 ...