selinux管理

selinux管理 查看SELinux状态​/usr/sbin/sestatus -v​​getenforce​ or cat /sys/fs/selinux/enforce​A value of 1​ means SELinux is in enforcing mode.A value of 0​ means SELinux is in permissive mode.关闭SELinux1、临时关闭不用重启机器设置SELinux 成为permissive模式 setenforce 0​设置SELinux 成为enforcing模式setenforce 1​2、修改配置文件需要重启机器修改/etc/selinux/config 文件将SELINUXenforcing改为SELINUXdisabled重启机器即可Disable SELinux脚本如下:setenforce 0 sed -i s/^SELINUX.*/SELINUXdisabled/ /etc/selinux/config