1、vim /etc/selinux/config Selinux的配置文件
# 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 - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected, 目標流程受保護
# minimum - Modification of targeted policy. Only selected processes are protected. 選定的受保護
# mls - Multi Level Security protection. 多級安全保護
SELINUXTYPE=targeted
enforcing:強制模式,代表Selinux運行中,
permissive:
disabled:
臨時更改Seinux的模式:
setcnforce 0 臨時關閉
setenforce 1 臨時打開
查看selinux狀態
sestatus