1. 程式人生 > >centos 7 selinux開啟關閉

centos 7 selinux開啟關閉

1 檢視selinux狀態

[[email protected] ~]# sestatus
SELinux status: disabled

2 關閉

零時關閉

[[email protected] ~]# setenforce 0
setenforce: SELinux is disabled

永久關閉修改檔案/etc/selinux/config 設定

SELINUX=disabled 即可,重啟後就行了
[[email protected] ~]# cat /etc/selinux/config

# 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=disabled # SELINUXTYPE= can take one of three two values: # targeted - Targeted processes are protected, # minimum
- Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted