nagiosでフリーな監視をしてみよう!~nagiosの構築(6)~
nagiosでフリーな監視をしてみよう!~nagiosの構築(6)~
NDOUtilsのインストール
NDOUtilsのインストールを紹介していきます。
(1) 必要となるパッケージを事前にインストールしておきます。
1 | # yum -y install mysql-devel |
(2)「/usr/local/src」ディレクトリに移動し、wgetコマンドでソースコードをダウンロードします。
1 2 | # cd /usr/local/src/ |
(3)ソースコードを解凍し、解凍したディレクトリに移動します。
1 2 | # tar xfz ndoutils-2.0.0.tar.gz # cd ndoutils-2.0.0 |
(4)configureを実行します。
1 2 3 4 | # ./configure --prefix= /usr/local/nagios -- enable -mysql --with-mysql= /usr/local/mysql |
(5)makeを実行します。
1 | # make |
(6)pacoに登録しつつ、make installを実行します。
1 | # paco -D make install |
NDOUtilsの設定
NDOUtilsの初期設定を紹介していきます。
(1) 設定ファイルを配置します。
1 2 | # cp config/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg # cp config/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg |
(2)ディレクトリの所有者を変更します。
1 | # chown nagios.nagios -R /usr/local/nagios |
(3)起動スクリプトを配置し、実行権限を付与します。
1 2 | # cp daemon-init /etc/init.d/ndo2db # chmod a+x /etc/init.d/ndo2db |