Centos6 view SELinux status close SELinux
SELinux (Security-Enhanced Linux) is the implementation of mandatory access control by the National Security Agency (NSA) and the most outstanding New Security Subsystem in Linux history. Under such access control system restrictions, a process can only access the files required in its tasks. SELinux is installed on Fedora and Red Hat Enterprise Linux by default.
Although SELinux is easy to use, we disable it in most cases, because using SELinux without knowing its mechanism will cause software installation or application deployment failure.
The following describes how to disable SELinux:
System Version: centos 6.5 mini
1. View selinux status
View the detailed status of selinux. If it is enable, it indicates that selinux is enabled.
#/Usr/sbin/sestatus-v
View selinux Mode
# Getenforce
2. Disable selinux
2.1: Permanently shut down (this will take effect after the server is restarted)
# Sed-I's/SELINUX = enforcing/SELINUX = disabled/'/etc/selinux/config
2.2: Temporary shutdown (effective immediately, but invalid after server restart)
# Setenforce 0 # Set selinux to permissive mode (that is, disable it)
# Setenforce 1 # Set selinux to enforcing mode (enable)
In this way, SELinux is disabled. When the installation software encounters problems, you can disable SELinux before installing SELinux.