When Linux is installed, it is usually the case that SELinux is turned on by default, which causes the installation of some services to be unsuccessful.
It can be completely closed if not needed, here is how to view it in CentOS 7.0 and turn off SELinux.
View SELinux Status
When Linux is installed, it is usually the case that SELinux is turned on by default, which causes the installation of some services to be unsuccessful. It can be completely closed if not needed, here is how to view it in CentOS 7.0 and turn off SELinux. View SELinux status [[email protected] ~]# sestatus SELinux status:enabled selinuxfs Mount: /sys/fs/selinux selinux root directory:/etc/selinux Loaded policy name:targeted Current mode: Enforcing Mode from config file:enforcing policy MLS status:enabled policy Deny_ Unknown status:allowed Max kernel policy version:28 temporarily closed [[email protected] ~]# Setenforce 0 Permanently closed, can modify configuration file /etc/selinux/config, set the SELinux to Disabled. [[email protected] ~]# cat/etc/selinux/config # This file controls the state of the SELinux on the system. # selinux= can take one of the these three values: # Enforcing-selinux Security policy is enforced. # Permissive-selinux Prints warnings instead of enforcing. # disabled-no SELinux policy is loaded. #SELINUX =enforcing selinux=disabled # SElinuxtype= can take one of three one of the values: # targeted-targeted processes is protected, # minimum-modific Ation of targeted policy. Only selected processes is protected. # Mls-multi level Security protection. Selinuxtype=targeted[[email protected] ~]# sestatus SELinux status:disabled
Temporarily closed
permanently closed , You can modify the configuration file/etc/selinux/config to set the SELinux to Disabled.
[Email protected] ~]# Cat/etc/selinux/config
# This file controls the state of the 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 =enforcing selinux=disabled
# selinuxtype= can take one of three the values:
# targeted-targeted processes is protected,
# Minimum-modification of targeted policy. Only selected processes is protected.
# Mls-multi level Security protection. selinuxtype=targeted
[Email protected] ~]# sestatus SELinux Status: disabled
CentOS 7.0 View selinux status | off | open