centos 7 selinux开启关闭

Posted fisherman_luo

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos 7 selinux开启关闭相关的知识,希望对你有一定的参考价值。

1 查看selinux状态

[[email protected] ~]# sestatus
SELinux status: disabled

2 关闭

零时关闭

[[email protected] ~]# setenforce 0
setenforce: SELinux is disabled

永久关闭修改文件/etc/selinux/config 设置

SELINUX=disabled 即可,重启后就行了
[[email protected] ~]# 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=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

 

以上是关于centos 7 selinux开启关闭的主要内容,如果未能解决你的问题,请参考以下文章

CentOS 7.3 安装Zabbix3.X

CentOS 7.2 安装Zabbix3.2

CentOS 修改selinux状态

CentOS 7.X 关闭SELinux

centos 7 临时和永久关闭Selinux

centos7永久关闭selinux