To disable SELinux on RedHat/Centos server is an easy process. All we need is to edit a config file located here:
/etc/selinux/config
Use your favorite text editor (I like vim) and edit the above file:
vim /etc/selinux/config
Change the value to SELINUX=disabled
# 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=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Then, you must reboot your RedHat/Centos server in order for changes take effect:
sudo reboot
That’s all! Go now and brew your favorite coffee. You can always contact me if you have any questions or write a comment below.