Warning: Undefined array key "HTTP_REFERER" in /home/webhostingchenna/domains/webhostingchennai.co.in/public_html/blog/wp-content/plugins/wp-linkbuilder/plugin/plugin_class.inc.php on line 637
Step By Step Guide - Disable SELinux On CentOS 7/6 - Web Hosting Chennai Official Blog

Step by step guide – Disable SELinux on CentOS 7/6

Step by step guide – Disable SELinux on CentOS 7/6

SELinux is a set of extra security restrictions on top of the normal Linux security tools. It gives the systems administrator a finer grain of control than what the kernel typically provides.

disable selinux

Here is the small guide for disabling SELinux on CentOS

Edit the /etc/selinux/config.

[root@webhostingchennai /]# nano /etc/selinux/config

Change from SELinux=enforcing

# 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=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are pr$
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

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,
# minimum - Modification of targeted policy. Only selected processes are pr$
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

This setup will disable SELinux on next reboot.

To disable SELinux without rebooting, use the following command.

[root@webhostingchennai /]# setenforce 0

This command will disable SELinux until you reboot the system.

Now, the SELinux has been disabled

You may also like...

Leave a Reply

Your email address will not be published.