linux 关闭selinux


查看selinux的状态

[root@greatdb-1 ~]# getenforce
Disabled

//enforceing代表开启 ,permissive代表警告,disabled代表关闭

如果不是状态不是disabled,修改其为关闭状态

vi /etc/sysconfig/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=disabled

# SELINUXTYPE= can take one of three values:

#     targeted - Targeted processes are protected,

#     minimum - Modification of targeted policy. Only selected processes are protected.

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted