1、查看

[root@dev-server ~]# getenforce
Disabled
[root@dev-server ~]# /usr/sbin/sestatus -v
SELinux status: disabled

2、临时关闭

##设置SELinux 成为permissive模式
##setenforce 1 设置SELinux 成为enforcing模式
setenforce 0

3、永久关闭

vi /etc/selinux/config

将SELINUX=enforcing改为SELINUX=disabled
设置后需要重启才能生效

centos 7.0 查看selinux状态|关闭|开启

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

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

查看selinux状态

 
[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

临时关闭

 
[root@localhost ~]# setenforce 0

永久关闭

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

 
[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

CentOS 7.X 关闭SELinux的更多相关文章

  1. centos 6.X 关闭selinux

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

  2. Centos 7.6关闭selinux

    查看selinux状态 [root@localhost ~]# sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SE ...

  3. centos7防火墙以设置以及关闭selinux

    一.CentOS 7.X 关闭SELinux 1.查看 getenforce permissive 或者 enforcing模式 2.临时设置 setenforce 1 成为permissive模式 ...

  4. CentOS工作内容(二)关闭SELinux

    CentOS工作内容(二)关闭SELinux CentOS安装完成后,有很多配置要改,不过最重要就是关闭SELinux SELinux是增强安全性的一项功能,不是SELinux不好,而是当功能安全性较 ...

  5. centos 关闭selinux 临时关闭selinux 报错 setenforce: setenforce() failed

    关闭selinux的方法有两种:临时关闭和永久关闭. 查看selinux的状态:estatus [root@--- ~]# sestatus SELinux status: enabled SELin ...

  6. centos关闭selinux

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

  7. centos 7.0 查看selinux状态|关闭|开启

    Linux在安装好之后通常SELinux都是出于默认开启的状态,开启的情况下会导致一些服务的安装不成功. 在不需要的情况下完全可以关闭掉,下面是在centos 7.0里面如何查看,关闭selinux. ...

  8. centos 7.X关闭防火墙和selinux

    一.关闭防火墙 centos从7开始默认用的是firewalld,这个是基于iptables的,虽然有iptables的核心,但是iptables的服务是没安装的. 所以你只要停止firewalld服 ...

  9. 【E20200101-1】Centos 7.x 关闭防火墙(firewall)和SELinux

    一.准备工作 1.1.服务器准备 操作系统:centos 7.x 1.2.安装好用的文本编辑工具nano # yum -y install nano 二.关闭SELinux 2.1.查看SELinux ...

随机推荐

  1. Error:Could not find com.android.tools.build:gradle:3.0.0

    Error:Could not find com.android.tools.build:gradle:3.0.Searched in the following locations:    file ...

  2. [控件] 创建出条形间隔效果的背景LineBackgroundView

    创建出条形间隔效果的背景LineBackgroundView 效果: 使用: // // ViewController.m // LineBackgroundView // // Created by ...

  3. 将JSON字典转换为Model文件

    将JSON字典转换为Model文件 1. 一切尽在不言中 2. 源码 https://github.com/YouXianMing/CreateModelFromJson 3. 说明 如果你还在手动写 ...

  4. Win7如何设置多用户同时远程登录

    有时候服务器是Win7系统的时候,远程登录桌面时,即使登录的是不同的管理账号,还是会把远程登录的人给记下来.即不同的账号只能同时存在一个会话窗.本文教大家如果设置Win7让两个账号的两会话同时存在,且 ...

  5. ZT linux的mount(挂载)命令详解

    linux的mount(挂载)命令详解   来源:互联网 作者:佚名 时间:09-08 17:02:27 [大 中 小] 点评:linux下挂载(mount)光盘镜像文件.移动硬盘.U盘.Window ...

  6. DevExpress02、RibbonControl

    RibbonControl 常用操作 1.如何代码显示选中的页 ribbonControl1.SelectedPage = ribbonPage2; 2.如何绑定ApplicationMenus和Po ...

  7. 【错误记录】uwsgi 启动 flask 出错

    在测试环境使用uwsgi启动flask未成功 正常报错信息: *** Starting uWSGI 2.0.13.1 (64bit) on [Fri Sep 23 09:27:47 2016] *** ...

  8. python第十五课——全局变量and局部变量

    全局变量&局部变量: 全局变量的特点: 1).直接定义在.py文件中(函数外)的变量(全局位置) 2).作用域比较大,可以被此文件中的任何函数所使用 局部变量的特点:1).定义在函数内部(函数 ...

  9. 打造自己的移动绿色版 Python 环境

    本文只适用 Windows 系统,Linux,Mac 或其他系统可以直接自己写个脚本安装就好了,甚至大部分系统自带. 相信某些人写好了Python程序结果给朋友运行又得装个Python环境,难免失去了 ...

  10. TensorFlow函数(十)tf.global_variables_initializer()

    tf.global_variables_initializer() 此函数是初始化模型的参数 with tf.Session() as sess: tf.global_variables_initia ...