目次

概要

nagios 3.3に日本語化パッチを適用してインストールする手順。

パッケージ

動作環境

OSCentOS 6.0 x86_64
nagios3.3.1
日本語化パッチ3.1.0用

前提条件

インストールには以下のパッケージが導入されていることを前提とする。

  • ApacheとPHPの連携設定が完了している
  • コンパイル用開発環境一式
  • gd
  • gd-devel
  • libpng

インストール手順

日本語化パッチの適用

tar xfvz nagios-3.3.1.tar.gz
cd nagios
wget http://jaist.dl.sourceforge.jp/nagios-jp/38828/nagios-3.1.0-ja-utf8.patch.gz 
gzip -dc nagios-3.1.0-ja-utf8.patch.gz| patch -p0

コンパイル

./configure --prefix=/usr/local/nagios --with-cgiurl=/nagio s/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-grp=nagios
make
make all
make install-init-init
make install-commandmode
make install-config
make install-webconf
make install-exfoliation
make install-classicui

自動起動設定

chkconfig --add nagios
chkconfig nagios on
chkconfig nagios on--list | grep nagios
nagios         	0:off	1:off	2:on	3:on	4:on	5:on	6:off

手動設定

mkdir /usr/local/nagios/var/spool
mkdir /usr/local/nagios/var/spool/checkresults
chwon -fR nagios.nagios /usr/local/nagios

プラグインのインストール

wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz
tar xfvz nagios-plugins-1.4.15.tar.gz 
cd nagios-plugins-1.4.15
./configure --prefix=/usr/local/nagios --with-cgiurl=/nagios/cgi-bin
make install

日本語フォントの導入

wget http://globalbase.dl.sourceforge.jp/efont/10087/sazanami-20040629.tar.bz2
zip2 -d sazanami-20040629.tar.bz2 
tar xfv zsazanami-20040629.tar 
cd sazanami-20040629
mkdir /usr/local/nagios/etc/font
cp *.ttf /usr/local/nagios/etc/font

Apache設定

  • /etc/httpd/conf/httpd.conf
    末尾に以下を追加
    
    Alias /nagios/cgi-bin/ "/usr/local/nagios/sbin"
    <Directory /usr/local/nagios/sbin>
         Options       ExecCGI FollowSymLinks
         AddHandler    cgi-script .cgi .pl
         AllowOverride All
         Order         allow,deny
         Allow from all
    </Directory>
    
    Alias /nagios/ "/usr/local/nagios/share"
    <Directory /usr/local/nagios/share>
         Options       Indexes FollowSymLinks
         AllowOverride All
         Order         allow,deny
         Allow from all
    </Directory>

動作設定

BASIC認証を無効化

  • ./nagios/etc/cgi.cfg
    【変更前】use_authentication=1
    【変更後】use_authentication=0

エラー対策

SE Linuxが有効な場合の対処

SE Linuxが有効化されている環境においては権限問題が発生する。
この問題を回避するためには、nagiosのWebコンテンツ部分をhttpdsの権限に差し替える。

chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/
chcon -R -t httpd_sys_content_t /usr/local/nagios/share/
/etc/init.d/nagios restart

参考


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2011-12-07 (水) 11:03:29 (4517d)