selinux 这个是用来维护系统安全的,开启之后会带来很多的权限问题,所以一般大家都会关闭它。

查看状态

  1. /usr/sbin/sestatus
  2. // SELinux status: disabled

可采取以来两种方式关闭

  • 在系统运行状态暂时关闭(重启后失效)
  1. setenforce 0
  • 编辑设置文件/etc/sysconfig/selinux,关闭SELinux(重启生效)
  1. # This file controls the state of SELinux on the system.
  2. # SELINUX= can take one of these three values:
  3. # enforcing - SELinux security policy is enforced.
  4. # permissive - SELinux prints warnings instead of enforcing.
  5. # disabled - No SELinux policy is loaded.
  6. #SELINUX=enforcing
  7. SELINUX=disabled
  8. # SELINUXTYPE= can take one of these two values:
  9. # targeted - Targeted processes are protected,
  10. # mls - Multi Level Security protection.
  11. SELINUXTYPE=targeted