2.5. Disabling SELinux
When you disable SELinux, your system does not load your SELinux policy. As a result, the system does not enforce the SELinux policy and does not log Access Vector Cache (AVC) messages. Therefore, all benefits of running SELinux are lost.
Do not disable SELinux except in specific scenarios, such as performance-sensitive systems where the weakened security does not impose significant risks.
If your scenario requires to perform debugging in a production environment, temporarily use permissive mode instead of permanently disabling SELinux. See Changing to permissive mode for more information about permissive mode.
Prerequisites
The
grubbypackage is installed:$ rpm -q grubby grubby-<version>
Procedure
Configure your boot loader to add
selinux=0to the kernel command line:$ sudo grubby --update-kernel ALL --args selinux=0Restart your system:
$ reboot
Verification
After the reboot, confirm that the
getenforcecommand returnsDisabled:$ getenforce Disabled