查看SELinux状态:
centos7关闭ssh服务、 方法1
/usr/sbin/sestatus -v | grep "SELinux status:"
#输出结果是enabled为开启,disabled为关闭。
关闭附近的人怎么关闭? 方法2
getenforce
#输出结果是permissive为关闭,enforcing为开启。
shell sed命令、关闭SELinux:
1、临时关闭(不重启系统即可生效):
setenforce 0
##设置SELinux为permissive模式,即关闭SELinux;如果数字为1则设置SELinux为enforcing模式,即开 启SELinux
2、永久生效(修改后需要重启系统才能生效)
修改/etc/selinux/config 文件,将SELINUX=enforcing改为SELINUX=disabled