Cacti+Nagios監控系統(三):安裝Nagios

來源:互聯網
上載者:User

標籤:cacti   監控   nagios   

一、添加使用者

  groupadd nagcmd

  useradd -G nagcmd nagios

  passwd nagios

    123456

  usermod -a -G nagcmd apache

二、安裝nagios

  cd /root/download

  wget http://jaist.dl.sourceforge.net/project/nagios/nagios-4.x/nagios-4.0.7/nagios-4.0.7.tar.gz

  也可以從這裡下載:http://www.nagios.org/download/

  tar xzvf nagios-4.0.7.tar.gz

  cd nagios-4.0.7

  ./configure --with-command-group=nagcmd  --enable-event-broker

  make all

  make install

  make install-init

  make install-config

  make install-commandmode

  make install-webconf

  設定登陸web介面時HTTP驗證的帳號密碼

  htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

  service httpd restart

三、安裝nagios-plugins

  cd /root/download

  wget http://nagios-plugins.org/download/nagios-plugins-2.0.2.tar.gz

  tar xzvf nagios-plugins-2.0.2.tar.gz

  cd nagios-plugins-2.0.2

  ./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-mysql

  make

  make install

  所有外掛程式命令將被安裝到/usr/local/nagios/libexec 目錄下

四、其他設定

  1、檢測nagios的配置

  /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

  2、添加自動動項

  chkconfig --add nagios

  chkconfig nagios on

  service nagios start

  3、登陸頁面

  http://localhost/nagios

  帳號nagiosadmin密碼123456

五、遇到的問題

  點擊頁面左側的MAP和History報錯:

  The requested URL /nagios/sbin/statusmap.cgi was not found on this server.

  The requested URL /nagios/sbin/histogram.cgi was not found on this server.

  原因一:因為gd-devel php-gd沒有安裝的問題,造成NAGIOS在編譯時間不產生這statusmap.cgi  

  原因二:NAGIOS在編譯在前, gd-devel安裝在後,造成不產生這statusmap.cgi


本文出自 “月晴星飛” 部落格,請務必保留此出處http://ywzhou.blog.51cto.com/2785388/1531926

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.