apacheとPHPのインストールが終わって、今日はいよいよnagios本体のインストールです。
nagios専用のユーザ/グループを作成します。
nagiosのソースファイルをダウンロードして、解凍します。
nagiosの最新版は下記からダウンロードしてきました。
nagiosの日本語パッチもダウンロードして、ソースファイルへの適用を行ないます。
日本語パッチは下記からダウンロードしてください。
http://ftp.momo-i.org/pub/security/nagios/patches/
nagios用の追加apache設定ファイルの置き場所をつくります。
また、apacheのhttpd.confに追加設定ファイルの場所、index.phpのトップページ設定の追記を行ないます。
configureしてコンパイル、インストールを行ないます。
なお、何種類かmake installがありますが、下記のような役割です。
同じようにnagiosの標準プラグインをインストールします。
configure時のprefixにはnagiosのパスを指定します。
プログラムファイル配置場所のパーミッション設定を行ないます。
[root@test01 ~]# useradd -d /usr/local/nagios/ -M nagios
nagios専用のユーザ/グループを作成します。
[root@test01 ~]# cd /usr/local/src/[root@test01 src]# wget http://sourceforge.net/projects/nagios/files/nagios-4.x/nagios-4.0.6/nagios-4.0.6.tar.gz/download[root@test01 src]# tar xzf nagios-4.0.6.tar.gz[root@test01 src]# cd nagios-4.0.6
nagiosのソースファイルをダウンロードして、解凍します。
nagiosの最新版は下記からダウンロードしてきました。
Nagios - Browse Files at SourceForge.net
http://sourceforge.net/projects/nagios/files/
[root@test01 nagios-4.0.6]# wget http://ftp.momo-i.org/pub/security/nagios/patches/nagios-jp-4.0.6.patch.gz[root@test01 nagios-4.0.6]# gzip -dc nagios-jp-4.0.6.patch.gz | patch -p1
nagiosの日本語パッチもダウンロードして、ソースファイルへの適用を行ないます。
日本語パッチは下記からダウンロードしてください。
http://ftp.momo-i.org/pub/security/nagios/patches/
[root@test01 nagios-4.0.6]# mkdir /usr/local/apache/conf.d/[root@test01 nagios-4.0.6]# vi /usr/local/apache/conf/httpd.confInclude conf.d/*.conf→追記<IfModule dir_module>DirectoryIndex index.html index.php→追記</IfModule>
nagios用の追加apache設定ファイルの置き場所をつくります。
また、apacheのhttpd.confに追加設定ファイルの場所、index.phpのトップページ設定の追記を行ないます。
[root@test01 nagios-4.0.6]# ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-http-conf=/usr/local/apache/conf.d/[root@test01 nagios-4.0.6]# make all[root@test01 nagios-4.0.6]# make install[root@test01 nagios-4.0.6]# make install-init[root@test01 nagios-4.0.6]# make install-commandmode[root@test01 nagios-4.0.6]# make install-config[root@test01 nagios-4.0.6]# make install-webconf
configureしてコンパイル、インストールを行ないます。
なお、何種類かmake installがありますが、下記のような役割です。
make install →基本コンポーネントのインストール
make install-init →自動起動ファイルのインストール
make install-commandmode →ディレクトリのパーミッション設定
make install-config →サンプル設定ファイルのインストール
make install-webconf →web設定ファイルのインストール
[root@test01 src]# wget http://nagios-plugins.org/download/nagios-plugins-2.0.2.tar.gz[root@test01 src]# tar xzf nagios-plugins-2.0.2.tar.gz[root@test01 src]# cd nagios-plugins-2.0.2[root@test01 nagios-plugins-2.0.2]# ./configure --prefix=/usr/local/nagios[root@test01 nagios-plugins-2.0.2]# make[root@test01 nagios-plugins-2.0.2]# make install
同じようにnagiosの標準プラグインをインストールします。
configure時のprefixにはnagiosのパスを指定します。
[root@test01 nagios-plugins-2.0.2]# chown -R nagios:nagios /usr/local/nagios/
プログラムファイル配置場所のパーミッション設定を行ないます。