Howto disable or enable SElinux on Centos 6.4 Redhat RHEL 6.4

Howto disable or enable SElinux on Centos 6.4 Redhat RHEL 6.4

centos

1. Check Linux Version we are using

[root@localhost ~]# cat /etc/redhat-release
CentOS release 6.4 (Final)
[root@localhost ~]#

2. Check SELinux status on Centos 6.4 or Redhat RHEL 6.4

[root@localhost ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: disabled
Policy version: 24
Policy from config file: targeted
[root@localhost ~]#

3. Disable SELinux and reboot the server

[root@localhost ~]# vi /etc/selinux/config
# 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
[root@localhost ~]#
[root@localhost ~]# init 6
[root@localhost ~]#

4.  Check SELinux after reboot Server

[root@localhost ~]# sestatus
SELinux status: disabled
[root@localhost ~]#

That’s all. Thanks for using IThelpblog.com

 

Tags:  

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>