Nagiosモニタリングプラットフォームの迅速なインストール
7127 ワード
Nagiosはオープンソースの無料ネットワーク監視ツールで、Windows、Linux、Unixのホスト状態、スイッチルータなどのネットワーク設定、プリンタなどを効果的に監視することができます.
一、まずapacheをインストールする:
二、phpをインストールする:
三、nagiosをダウンロードする:
四、サーバー側で、Nagiosとnrpe、nagiosプラグインをインストールする:
五、webアクセスユーザーの作成:
六、クライアントにnrpe、nagios-pluginをインストールする:
一、まずapacheをインストールする:
- apache, yum , yum install –y httpd
- apache , apache /etc/init.d/httpd restart !
二、phpをインストールする:
- Nagios php , php, yum
- Yum install php php-devel -y
三、nagiosをダウンロードする:
- nagios :
- wget http://sourceforge.net/projects/nagios/files/nagios-3.x/nagios-3.2.1/nagios-3.2.1.tar.gz/download
- wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz/download
- wget http://jaist.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.13/nrpe-2.13.tar.gz
-
- Nagios
- useradd nagios
- passwd nagios
四、サーバー側で、Nagiosとnrpe、nagiosプラグインをインストールする:
- Nagios
- tar zxvf nagios-3.2.1.tar.gz
- cd nagios-3.2.1
- ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios
- make all
- make install // ,CGI HTML
- make install-init // /etc/rc.d/init.d
- make install-config // , /usr/local/nagios/etc
- make install-commandmode//
- make install-webconf
-
- Nagios-plugins
- tar zxvf nagios-plugins-1.4.15.tar.gz
- cd nagios-plugins-1.4.15
- ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios
- make && make install
- nrpe
- tar -xzf nrpe-2.13.tar.gz && cd nrpe-2.13 &&./configure --enable-ssl --with-ssl-lib &&make all && make install-plugin && make install-daemon && make install-daemon-config
- chown -R nagios:nagios /usr/local/nagios/
-
- /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d nrpe
五、webアクセスユーザーの作成:
- :( c)
- htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
-
- nagios , apache, nagios,/etc/init.d/nagios restart
- :http://localhost/nagios/ ! nagios
六、クライアントにnrpe、nagios-pluginをインストールする:
- nagios-plugins-1.4.15.tar.gz nrpe-2.13.tar.gz,
-
- :
- #!/bin/sh
- ###auto make install nagios_plugin and nrpe
- useradd nagios
- tar -xzf nagios-plugins-1.4.15.tar.gz &&cd nagios-plugins-1.4.15 &&./configure --prefix=/usr/local/nagios &&make &&make install
-
- sleep 2
-
- echo "This is make install nrpe ,please waiting .................."
- cd ../ ; tar -xzf nrpe-2.13.tar.gz && cd nrpe-2.13 &&./configure --enable-ssl --with-ssl-lib &&make all && make install-plugin && make install-daemon && make install-daemon-config
-
- chown -R nagios:nagios /usr/local/nagios/
- cd .. ;cp nrpe.cfg /usr/local/nagios/etc/nrpe.cfg
-
- /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
-
- ###Add auto start
- grep "nrpe" /etc/rc.local
-
- if [ $? -ne 0 ];then
- echo "/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d" >>/etc/rc.local
- else
- echo "nrpe is exist"
- fi
- !