標籤:nagios 安裝
Nagios 官網 http://www.nagios.org
伺服器配置
nagios 也需要 apache+php 的環境,CentOS6預設的 yum 源裡沒有 nagios 相關的rpm包,所以要安裝一個epel的擴充源。
[[email protected] ~]# yum install -y epel-release
安裝nagios相關包
[[email protected] ~]# yum install -y httpd nagios nagios-plugins nagios-plugins-all nrpe nagios-plugins-nrpe
設定登入nagios背景使用者和密碼
[[email protected] ~]# htpasswd -c /etc/nagios/passwd nagiosadminNew password:Re-type new password:Adding password for user nagiosadmin
檢查設定檔是否有問題
[[email protected] ~]# nagios -v /etc/nagios/nagios.cfgTotal Warnings: 0Total Errors: 0Things look okay - No serious problems were detected during the pre-flight check
啟動服務
[[email protected] ~]# service httpd start ; service nagios start
瀏覽器訪問:http://ip/nagios
650) this.width=650;" src="http://s4.51cto.com/wyfs02/M02/83/B1/wKiom1d6U-aQNF9CAABeJ18HdO8522.png" style="float:none;" title="2.1-1.PNG" alt="wKiom1d6U-aQNF9CAABeJ18HdO8522.png" />
輸入使用者名稱 nagiosadmin,密碼是剛剛設定的。
650) this.width=650;" src="http://s4.51cto.com/wyfs02/M01/83/B1/wKiom1d6U-jx_vu7AAH0EEUdWcs769.png" style="float:none;" title="2.1-2.PNG" alt="wKiom1d6U-jx_vu7AAH0EEUdWcs769.png" />
此時,nagios監控的只有localhost,還沒有其他用戶端機器,要想添加監控客戶機,還需要在用戶端安裝nagios相關的軟體包,並且需要在服務端配置。
650) this.width=650;" src="http://s4.51cto.com/wyfs02/M02/83/AF/wKioL1d6U-mSEndiAACdAU7jQiI703.png" style="float:none;" title="2.1-3.PNG" alt="wKioL1d6U-mSEndiAACdAU7jQiI703.png" />
650) this.width=650;" src="http://s4.51cto.com/wyfs02/M00/83/AF/wKioL1d6U-rQ8YClAAE22jPTSI4001.png" style="float:none;" title="2.1-4.PNG" alt="wKioL1d6U-rQ8YClAAE22jPTSI4001.png" />
本文出自 “散宜生的學習筆記” 部落格,請務必保留此出處http://sanyisheng.blog.51cto.com/11154168/1795722
2.1 nagios 安裝