[精讚] [會員登入]
801

solution for selinux issue while installing zabbix agent on centos7

install zabbix agent as service will raise selinux issue on some centos 7.3.1611

分享此文連結 //n.sfs.tw/15274

分享連結 solution for selinux issue while installing zabbix agent on centos7@外行中的外行
(文章歡迎轉載,務必尊重版權註明連結來源)
2021-06-24 14:07:46 最後編修
2021-06-24 13:29:39 By jung
 

在IDP主機上安裝zabbix agent並設定後,要啟動服務systemd

在CentOS Linux release 7.6.1810 正常,不會報錯

但在CentOS Linux release 7.3.1611會出現selinux權限問題

要做以下修正

1. 先暫時改成permissive模式

zabbix_agent_t 為暫存設定檔名稱,可自訂

semanage permissive -a zabbix_agent_t

2. 啟動zabbix agent

systemctl start zabbix-agent

3. 觀察audit紀錄

zabbix_cli參數為暫存檔名,可自訂

ausearch -r -m avc -ts today | audit2allow -M zabbix_cli

4. 執行audit2allow產生的建議指令

semodule -i zabbix_cli.pp

5. 刪除permissive暫存設定檔

semanage permissive -d zabbix_agent_t

6. 重新啟動zabbix-agent systemd服務

systemctl restart zabbix-agent

 

zabbix設定很複雜呢,看來也是個坑@@

 

END

你可能感興趣的文章

更新程式環境到wildfly18+openjdk11-phase4: 認證程式更新 認證程式更新

更新程式環境到wildfly18+openjdk11-phase2: update IDEA to jdk11 更新IDEA 編譯環境

在apache http server停用TLS 1.0/1.1 and SSL 2.0/3.0 How to disable outdated versions of SSL/TLS on Apache

回應 修正pom.xml,

新增縣市端回傳使用者資料功能 新增縣市端回傳使用者資料功能

新增IDP程式使用google防機器人的驗證功能 身份認證程式新增google防機器人v2

隨機好文

新增IDP程式使用google防機器人的驗證功能 身份認證程式新增google防機器人v2

在windows環境下強制刪除無法以檔案總管刪除的檔案或目錄 how to remove directories or files that cannot be deleted by default file manager

如何用git log功能產生有固定格式的commit紀錄 how to create a git commit history log file with custom format

啟動chrome時要求須輸入密碼enter password to unlock login keyring asking for entering password to unlock login kerying on Ubuntu desktop

JIRA instance migration phase1 how to migrate JIRA from centos6 to centos7