如何启用或者禁用SELinux,参考“开发指南”的章节“44.2.7. Enable or Disable SELinux”:

  http://www.RedHat.com/docs/manuals/enterprise/RHEL-5-manual/Deployment_Guide-en-US/sec-sel-enable-disable.html

禁用SELinux方法有两种:

  1、命令方式下编辑/etc/sysconfig/selinux,把SELINUX=permissive改成SELINUX=disabled。需要提醒的是,修改SELINUX或者SELINUXTYPE后,只有在下次重启机器的时候修改方可生效。

[root@host2a ~]# cat /etc/sysconfig/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 - SELinux is fully disabled.

SELINUX=permissive

# SELINUXTYPE= type of policy in use. Possible values are:

# targeted - Only targeted network daemons are protected.

# strict - Full SELinux protection.

SELINUXTYPE=targeted

# SETLOCALDEFS= Check local definition changes

SETLOCALDEFS=0

 

相关文章:

  • 2021-12-09
  • 2022-12-23
  • 2021-06-28
  • 2022-12-23
  • 2022-02-05
  • 2022-01-23
  • 2021-08-19
  • 2022-12-23
猜你喜欢
  • 2021-12-15
  • 2021-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-02-17
  • 2022-12-23
相关资源
相似解决方案