SElinux 错误的查看处理 ,开启SElinux使用zabbix
发布时间:2020-12-14 00:21:08 所属栏目:Linux 来源:网络整理
导读:本文章所使用的方法均来源于网络,参考的地址如下 使用的操作系统为centos7? https://blog.csdn.net/lpc1162303536/article/details/98315658https://www.cnblogs.com/langdashu/p/5239109.htmlhttps://blog.csdn.net/fanper/article/details/79707461 https
本文章所使用的方法均来源于网络,参考的地址如下 使用的操作系统为centos7? https://blog.csdn.net/lpc1162303536/article/details/98315658
https://www.cnblogs.com/langdashu/p/5239109.html
https://blog.csdn.net/fanper/article/details/79707461
遇到SElinux阻止的问题先 查看错误日志的文件 在两个地方 /var/log/audit/audit.log #只会说明错误,但是不会提供解决办法,且阅读复杂
/var/log/messages #文件可以详细的记录错误,并且提供解决方法,但是有时候却没有记录
查看日志的方法 sealert?-a?/var/log/audit/audit.log (命令安装如下) 安装 sealert 命令: yum install setools 使用方式参考了 https://blog.csdn.net/lpc1162303536/article/details/98315658 ? ?开启SElinux 运行zabbix 需要设置 //允许使用10051端口
semanage port -a -t http_port_t -p tcp 10051
//这个好像是生成规则的
grep fping /var/log/audit/audit.log | audit2allow -M zabbix_fping
semodule -i zabbix_fping.pp
? semodule命令和audit2allow 安装如下 yum provides semanage
yum -y install policycoreutils-python.x86_64
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |