Administration CentOS Fedora Linux

Disable SELinux

Security-Enhanced Linux (SELinux) is a mandatory access control (MAC) security mechanism implemented in the Linux kernel. This mechanism adds an extra layer of access security to your files,directories,devices, ports and even processes.

I strongly recommend that you implement SELinux in your environment. But, in some cases, you may want to disable it to avoid some unnecessary issues.

To disable SELinux in CentOS boxes on the fly, simply type the following command as root:

setenforce 0 

To disable it permanently and remain in effect even after reboots, simply edit the file “/etc/selinux/config” and change the following

SELINUX=enforcing

to

SELINUX=disabled

Related Articles

  • Add IP to CentOS 5/6

    If you recently got a secondary IP block for your server but you do not know how to bind the secondary IP address, please follow the steps below:   First, run...
  • Patching The Ghost Vulnerability

    The Ghost vulnerability, also known as CVE-2015-0235, is an exploit in a library named glibc. This library is referenced by many applications which run on your server. The exploit is...
  • How to List Which Apache 2 Modules are Enabled on CentOS 6.x

    View Loaded Apache Modules Just one command: apachectl -M Or, if you want to view the list in alphabetical order: apachectl -M | sort Or, if you want to view...
  • Assign range of IP addresses to an interface.

    Sometimes you may need to assign a wide range of IP addresses to your network interface in Linux systems. Instead of manually creating aliases for the network interface, it is...