rhcsa-第二题selinux.md

2. 确认 selinux 模式

请按下列要求设定系统:
SeLinux 的工作模式为 enforcing
要求系统重启后依然生效

[root@server0 ~]#vim /etc/sysconfig/selinux
SELINUX=enforcing
[root@server0 ~]# setenforce 1


*备注
目前 SELinux 支持三种模式,分别如下:
*

•enforcing:强制模式,代表 SELinux 运作中,且已经正确的开始限制 domain/type 了; •permissive:宽容模式:代表 SELinux 运作中,不过仅会有警告讯息并不会实际限制 domain/type 的存取。这种模式可以运来作为 SELinux 的 debug 之用;
•disabled:关闭,SELinux 并没有实际运作。

你可能感兴趣的:(RHCSA)