selinux 關閉

查看selinux狀態

sestatus 命令linux

[benny@benny ~]$ sestatus
SELinux status:                 disabled

臨時關閉

[benny@benny ~]$ setenforce  0
setenforce: SELinux is disabled

永久關閉

修改配置文件/etc/selinux/config,將其中SELINUX設置爲disabledshell

# 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
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
相關文章
相關標籤/搜索