How to disable SELinux on KVM

This applies only to KVM based VPSes and dedicated servers running CentOS/RHEL based operating systems only.

Edit the SELinux config file

nano /etc/selinux/config

Set SELINUX=disabled and SELINUXTYPE=targeted, It should then look like this,

# 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.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

Save & exit the file

Reboot the VPS/Dedicated Server and SELinux would have been disabled,

reboot

You can verify the SELinux status with the following command,

sestatus

It should now return back,

SELinux status:                 disabled

CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS