Disable SELinux on CentOS/RHEL

To disable SELinux

Method 1

sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
setenforce 0

Method 2

edit file

vi /etc/selinux/config

Find

SELINUX=enforcing

Replace with

SELINUX=disabled

Reboot the server with

reboot

You can disable selinux for current session by running command

setenforce 0

See SELinux

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *