SElinux is the implementation of the U.S. National Security Agency's enforcement of access control.
Modify the configuration file to disable SELinux for permanent effect: (restart Effective)
[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
# selinuxtype= can take one of these the values:
# targeted-targeted processes is protected,
# Mls-multi level Security protection.
selinuxtype=targeted
[Email protected] ~]# sed-i "S#selinux=enforcing#selinux=disabled#g"/etc/selinux/config
[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=disabled
# selinuxtype= can take one of these the values:
# targeted-targeted processes is protected,
# Mls-multi level Security protection.
selinuxtype=targeted
[[email protected] ~]# grep =disabled/etc/selinux/config
Selinux=disabled
Temporary entry into force:
[Email protected] ~]# Getenforce
Enforcing
[Email protected] ~]# Setenforce
Usage:setenforce [Enforcing | Permissive | 1 | 0]
[Email protected] ~]# Setenforce 0
[Email protected] ~]# Getenforce
Permissive
Getenforce Checking selinux status
Setenforce setting SELinux Status 1 Enable 0 warning, do not enable
In order for the restart or not restart to take effect, both of the above methods have to be modified
Operating level:
There are 7 levels of operation, looking at various levels:
[Email protected] ~]# Tail/etc/inittab
# Default RunLevel. The runlevels used is:
# 0-halt (do not set Initdefault to this)
# 1-single User mode--single user
# 2-multiuser, without NFS (the same as 3, if you don't have networking)
# 3-full Multiuser Mode--Fully multi-user
# 4-unused
# 5-x11--Switch to desktop environment, need to install desktop package
# 6-reboot (do not set Initdefault to this)
#
Id:3:initdefault:
To view the run level:
[Email protected] ~]# RunLevel
N 3
To switch the run level:
[[Email protected] ~]# init 6---> (restart)
How to turn off the Linux firewall:
/etc/init.d/iptables stop==service iptables stop is best performed two times in succession
Or:
[Email protected] ~]# chkconfig iptables off
To view the firewall:
[Email protected] ~]# iptables-l-N
SELinux, run level init, firewall iptables