SELinux:美国NSA国家安全局提供的一套基于内核的增强强制安全保护机制。
SELinux的运行模式:enforcing(强制),permissivs(宽松),disabled(禁用)
查看/切换SELinux模式:
*getenforce //临时检查SELinux状态
*setenforce 1|0 //只能在强制、宽松之间切换
'''配置文件:1) /etc/httpd/conf/httpd.conf [Include]
--2) /etc/httpd/conf.d/*.conf'''
开机后自动选择SELinux模式:
#
vim /etc/selinux/config
SELINUX=enforcing
reboot
#
SELinux排错:
#yum -y install setroubleshoot-server //安装试错工具
#systemctl restart httpd //试错
#journalctl -xe //查错(利用系统日志控制工具)
#grep setrouble /var/log/messages//会提示如何查看详细信息、查错
#sealert -l .. ..//查看详细警告(根据提示排错)