Rate This Document
Findability
Accuracy
Completeness
Readability

Disabling SELinux

SELinux may restrict the access permission of applications. Therefore, disable SELinux to ensure that applications run properly. Disabling SELinux may impair system security and make the system more vulnerable to potential security problems and attacks. Assess the potential risks before disabling SELinux. Disable SELinux on all nodes.

  • Disable SELinux temporarily.
    setenforce 0
  • Disable SELinux permanently.
    1. Modify the configuration file to disable SELinux permanently:
      sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
      cat /etc/selinux/config

      If "SELINUX=disabled" is displayed, as shown in the following figure, the modification is successful.

    2. After SELinux is disabled, restart the server.