Disable SELinux:


To disable SElinux, the security system within centos, you need to modify the SElinux file. Reasons for wanting to disable SElinux, would be that your server is internal, and to configure each service is a waste of time. SELinux is good for machines that are facing the internet, within a De-militarized Zone.

The SELinux configuration file is located at


To disable SELinux go to the configuration file look for the following line


then change the line to


# 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 – SELinux is fully disabled.
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection. SELINUXTYPE=targeted
# SETLOCALDEFS= Check local definitition file.

The above with take effect during the next reboot, but if you need the effect to be immediate you can disable SELinux immediately at the command line with the following command

# setenforce 0