Disable SELinux on CentOS 6.5

Share this Article :

This post will show how to disable Security-Enhanced Linux (SELinux) on CentOS 6.5. The steps was very simple, but if we did not disable this feature, you may hit a problem when try to do software installation. SELinux checking for allowed operations after standard Linux discretionary access controls are checked.

1. Check selinux status :

[[email protected] ~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        targeted

2. Disable SELinux on CentOS 6.4 permanently :

[[email protected] ~]# vi /etc/sysconfig/selinux

Change “SELINUX=enforcing” 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

3. Reboot CentOS 6.5 Operating system :

[[email protected] ~]# init 6

or

[[email protected] ~]# reboot

Leave a Reply