SELinux 的启动、关闭与查看
SELinux配置文件位于 /etc/selinux/config

三种模式介绍如下:
SELINUX=enforcing #此项定义selinux状态。
#enforcing—是强制模式系统受selinux保护。就是你违反了策略,你就无法继续操作下去
#permissive—是提示模式系统不会受到selinux保护,只是收到警告信息。
permissive就是Selinux有效,但是即使你违反了策略的话它让你继续操作,但是把你的违反的内容记录下来(警告信息)
#disabled—禁用selinux。
SELINUXTYPE=targeted
#此项定义selinux使用哪个策略模块保护系统。targeted只对apache ,sendmail,bind,postgresql,nfs,cifs等网络服务保护。
以上策略配置都放置在/etc/selinux目录中,目录和策略名称相同
修改完配置文件要重启服务器,配置生效!
查看SELinux状态:

网友评论