Disable SELinux on CentOS 6 / Disable SELinux on RHEL 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.  Here is the small guide for disabling SELinux on CentOS/RHEL6.

 

 

 

 

Switch to root user.

[geeksite@geeksite]$ su -
Password:

Edit the /etc/selinux/config.

[root@geeksite]# vi /etc/selinux/config

Change 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,
#     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,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

This will disable SELinux on next reboot.
To disable SELinux without rebooting, use the following command.

[root@geeksite]# setenforce 0

This will disable SELinux until you reboot the system.

POSTS YOU MAY LIKE -:)

Share This Post

  • I’ve study quite a few good products in this article. Undoubtedly price tag social bookmarking to get revisiting. I wonder what sort of lot attempt you put to produce the type of spectacular informative internet site.

Shares