[精讚] [會員登入]
490

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-phase1: upgrade mongodb server 更新程式環境到wildfly18+openjdk11-phase1: upgrade mongodb server to version 3.6

縣市IDP新增API功能 修改IDP程式增加API介面

縣市端IdP新增自訂首頁內容功能 合併本部主程式,手動於mongo內新增管理使用者資料

系統不正常關機導致mongodb啟動失敗 重新安裝mongodb使用mongorestore

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

縣市IDP更換SSL憑證及修改servername+wildfly等設定 縣市IDP更換SSL

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

使用virtualbox每次都忘記的事情 share folder from win host to linux guest vm

系統不正常關機導致mongodb啟動失敗 重新安裝mongodb使用mongorestore

使用群暉NAS內建VPN SERVER套件的OPENVPN功能注意事項 使用群暉NAS內建VPN SERVER套件的OPENVPN功能注意事項

使用bash script 顯示及比較記憶體剩餘用量 How to get the available memory reported as a percentage then compare Numbers and Strings in Linux Shell Script

testing gitlab and jenkins CI/CD on docker-1 在docker架設gitlab, jenkins 測試CI/CD pipeline第一章