selinux 这个是用来维护系统安全的,开启之后会带来很多的权限问题,所以一般大家都会关闭它。
查看状态
/usr/sbin/sestatus
// SELinux status: disabled
可采取以来两种方式关闭
- 在系统运行状态暂时关闭(重启后失效)
setenforce 0
- 编辑设置文件/etc/sysconfig/selinux,关闭SELinux(重启生效)
# 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,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted