nagios インストール手順 Since: 2004.10.19
Last: 2004.10.19

■環境情報
OS: Redhat Linux 7.3
nagios: 1.2
■入手先
nagios 配布元: http://www.nagios.org/

■ソースファイル入手
nagiosを一通り動作させるには、nagios本体とプラグインが必要である。また、構成図を使用する場合はイメージパックを取得しておくと良い。

nagios本体(tar ball)
wget http://voxel.dl.sourceforge.net/sourceforge/nagios/nagios-1.2.tar.gz

プラグイン(tar ball)
wget http://voxel.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.3.1.tar.gz

イメージパック(tar ball)
wget http://voxel.dl.sourceforge.net/sourceforge/nagios/imagepak-base.tar.gz

■nagiosインストール
以下の手順にてnagios本体とプラグインをコンパイル・インストールする。

tar xfvz nagios-1.2.tar.gz
cd nagios-1.2
/usr/sbin/useradd nagios

./configure --prefix=/usr/local/nagios with-cgiurl=/admin/nagios/cgi-bin --with-htmurl=/admin/nagios --with-nagios-user=nagios --with-nagios-grp=nagios

make all
make install


起動スクリプトをインストール

make install-init


サンプル設定ファイルをインストール

make install-config


続いて、プラグインをコンパイルインストール

tar xfvz nagios-plugins-1.3.1.tar.gz
su nagios
cd nagios-plugins-1.3.1
./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-cgiurl=/admin/nagios/cgi-bin
make all
make install


イメージパックは /usr/local/nagios/share/image/logos/ 配下に展開する。


インストール作業は以上となるが、設定ファイルの作成を行うまでnagiosを動作させることはできない


■パス
前述の実行例を使用すると以下の場所にnagiosがインストールされる。

インストール先/usr/local/nagios/
サンプル設定ファイル/usr/local/nagios/etc/
ドキュメントルート/usr/local/nagios/share/
Webインターフェイス用CGI/usr/local/nagios/sbin/
ロゴ画像/usr/local/nagios/share/image/logos/
起動スクリプト/etc/init.d/nagios


■configureオプション
configure実行時に指定するオプションは以下のとおり。

--prefix=インストール先の指定
--with-cgiurl=CGIを稼働させるURL
--with-htmurl=WebインターフェイスとドキュメンテーションHTMLを表示させるURL
--with-nagios-user=nagiosの実行ユーザー名
--with-nagios-grp=nagiosの実行グループ名


戻る