Turn off SELinux functionality
1. Permanently closed
1.1 Check, Backup
Permanently close SELinux
1. Pre-operation Backup
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
# selinuxtype= can take one of these the values:
# targeted-targeted processes is protected,
# Mls-multi level Security protection.
selinuxtype=targeted
Cp/etc/selinux/config/etc/selinux/config.bak
Ls-l/etc/selinux/config*
-rw-r--r--. 1 root root 458 Jul 11:02/etc/selinux/config
-rw-r--r--. 1 root root 458 Jul 02:08/etc/selinux/config.bak
2.sed Modify, look at the results, do not add-I
This file controls the state of the SELinux on the system.
Selinux= can take one of these three values:
Enforcing-selinux has been activated.
Permissive SELinux Temporary deactivation will display a warning
Disabled-selinux completely shut down no longer running
Selinux=enforcing modified to Disabled
3. Modifying the SELinux configuration
Cat/etc/selinux/config
This file controls the state of the SELinux onthe system.
Selinux= can take one of these threevalues:
Enforcing-selinux security policy is enforced.
Permissive-selinux prints warnings instead of enforcing.
Disabled-no SELinux policy is loaded.
Selinux=disabled
Selinuxtype= can take one of these twovalues:
Cat/etc/selinux/config
This file controls the state of the SELinux onthe system.
Selinux= can take one of these threevalues:
Enforcing-selinux security policy is enforced.
Permissive-selinux prints warnings instead of enforcing.
Disabled-no SELinux policy is loaded.
Selinux=disabled
Selinuxtype= can take one of these twovalues:
4. Temporarily close SELinux
Temporarily close SELinux
1. View SELinux Status
Getenforce
Enforcing
2. Turn off SELinux
Setenforce
Usage:setenforce [Enforcing | Permissive | 1 | 0]
Setenforce 0
Getenforce
Permissive
3. Failure after restarting the server
This article is from the "Heyong" blog, make sure to keep this source http://heyong.blog.51cto.com/13121269/1954573
Turn off SELinux functionality