差分
この文書の現在のバージョンと選択したバージョンの差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
|
management:centreon:install:start [2011/03/09 22:21] yuki |
— (現在) | ||
|---|---|---|---|
| ライン 1: | ライン 1: | ||
| - | ====== インストール ====== | ||
| - | <note important> | ||
| - | 以下のコンポーネントの組み合わせで構築する。 | ||
| - | * Ubuntu 10.04 Server amd64 | ||
| - | * Centreon2.1.12 | ||
| - | * nagios-3.2.3 | ||
| - | * MySQL 5.1 | ||
| - | </note> | ||
| - | ===== 前提条件 ===== | ||
| - | |||
| - | * OSはインストール後に、OpenSSHを入れただけの状態とする。 | ||
| - | * <code># apt-get install openssh-server</code> | ||
| - | * 全てrootにて操作する。 | ||
| - | * インストールの順序、内容は下記の公式wikiを元に進行する。 | ||
| - | * http://en.doc.centreon.com/Setup | ||
| - | |||
| - | ===== 基本ソフトウェアのインストール ===== | ||
| - | |||
| - | * <code>apt-get install tofrodos lsb-release | ||
| - | apt-get install heirloom-mailx | ||
| - | apt-get install postfix | ||
| - | apt-get install build-essential | ||
| - | apt-get install apache2 apache2-mpm-prefork | ||
| - | apt-get install php5 php5-mysql php-pear php5-ldap php5-snmp php5-gd | ||
| - | apt-get install mysql-server libmysqlclient15-dev | ||
| - | apt-get install rrdtool librrds-perl | ||
| - | apt-get install libconfig-inifiles-perl libcrypt-des-perl libdigest-hmac-perl libdigest-sha1-perl libgd-gd2-perl | ||
| - | apt-get install snmp snmpd libnet-snmp-perl libsnmp-perl | ||
| - | apt-get install libgd2-xpm libgd2-xpm-dev libpng12-dev</code> | ||
| - | |||
| - | * MySQLのパスワードは任意。 | ||
| - | * 設定した場合は、CentreonのWebUIインストール画面にて入力する必要あり。 | ||
| - | |||
| - | ===== SNMPの調整 ===== | ||
| - | |||
| - | * master agentxのコメントアウトを解除 | ||
| - | * <code>vi /etc/snmp/snmpd.conf | ||
| - | /etc/init.d/snmpd restart</code> | ||
| - | |||
| - | ===== Nagiosの導入 ===== | ||
| - | |||
| - | * nagios3の入手 | ||
| - | * 基本はQuickStartも並行して確認する。 | ||
| - | * http://nagios.sourceforge.net/docs/3_0/quickstart.html | ||
| - | * <code>wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.3.tar.gz</code> | ||
| - | |||
| - | * nagios用のアカウント作成と調整 | ||
| - | * <code>/usr/sbin/useradd -m -s /bin/bash nagios | ||
| - | passwd nagios | ||
| - | /usr/sbin/groupadd nagcmd | ||
| - | /usr/sbin/usermod -a -G nagcmd nagios | ||
| - | /usr/sbin/usermod -a -G nagcmd www-data</code> | ||
| - | |||
| - | * 以下のこの2行はいらない | ||
| - | * <code># /usr/sbin/groupadd nagios | ||
| - | groupadd: group 'nagios' already exists | ||
| - | /usr/sbin/usermod -G nagios nagios</code> | ||
| - | |||
| - | * 解凍からインストールまで | ||
| - | * <code>tar -xzf nagios-3.2.3.tar.gz | ||
| - | cd nagios-3.2.3 | ||
| - | ./configure --prefix=/usr/local/nagios --with-command-group=nagcmd --enable-nanosleep --enable-event-broker | ||
| - | make all | ||
| - | make install | ||
| - | make install-init | ||
| - | make install-commandmode | ||
| - | make install-config</code> | ||
| - | |||
| - | ===== Nagios-Pluginの導入 ===== | ||
| - | |||
| - | * 入手 | ||
| - | * <code>wget http://ovh.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz</code> | ||
| - | |||
| - | * プラグイン動作のための基本アプリケーションの導入 | ||
| - | * <code>apt-get install dnsutils fping | ||
| - | apt-get install libssl-dev | ||
| - | apt-get install libldap2-dev | ||
| - | apt-get install libpq-dev | ||
| - | apt-get install libradiusclient-ng-dev<code> | ||
| - | |||
| - | * nagios-pulginの解凍からインストールまで | ||
| - | * <code>tar -xzf nagios-plugins-1.4.15.tar.gz | ||
| - | cd nagios-plugins-1.4.15 | ||
| - | ./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl=/usr/bin/openssl --enable-perl-modules | ||
| - | make | ||
| - | make install | ||
| - | cd ../</code> | ||
| - | |||
| - | * ndoutilはnagiosのDB用パッカー。 | ||
| - | * パッチを当てる必要があるので、パッチのダウンロードから解凍、適応、ビルドまで | ||
| - | * <code>wget http://prdownloads.sourceforge.net/sourceforge/nagios/ndoutils-1.4b9.tar.gz | ||
| - | tar -xzf ndoutils-1.4b9.tar.gz | ||
| - | cd ndoutils-1.4b9 | ||
| - | wget http://svn.centreon.com/trunk/ndoutils-patch/ndoutils1.4b9_light.patch | ||
| - | patch -p1 -N < ndoutils1.4b9_light.patch | ||
| - | ./configure --prefix=/usr/local/nagios/ --enable-mysql --disable-pgsql --with-ndo2db-user=nagios --with-ndo2db-group=nagios | ||
| - | make | ||
| - | |||
| - | * インストール | ||
| - | <note warning>インストールは手動で行う必要があります。</note> | ||
| - | * <code>cp ./src/ndomod-3x.o /usr/local/nagios/bin/ndomod.o | ||
| - | cp ./src/ndo2db-3x /usr/local/nagios/bin/ndo2db | ||
| - | cp ./config/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg | ||
| - | cp ./config/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg | ||
| - | sudo chmod 774 /usr/local/nagios/bin/ndo* | ||
| - | sudo chown nagios:nagios /usr/local/nagios/bin/ndo* | ||
| - | cp ./daemon-init /etc/init.d/ndo2db | ||
| - | chmod +x /etc/init.d/ndo2db | ||
| - | update-rc.d ndo2db defaults | ||
| - | cd ../<code> | ||
| - | |||
| - | ===== Centreonのインストール ===== | ||
| - | |||
| - | * Centreonを入手してインストール開始 | ||
| - | * <code>wget http://download.centreon.com/centreon/centreon-2.1.12.tar.gz | ||
| - | tar -xzf centreon-2.1.12.tar.gz | ||
| - | cd centreon-2.1.12 | ||
| - | export PATH="$PATH:/usr/local/nagios/bin/" | ||
| - | ./install.sh -i</code> | ||
| - | |||
| - | * この間、シェルに淡々と回答していくフェーズ。詳しくは下記URLに従うことを推奨する。 | ||
| - | * http://en.doc.centreon.com/Setup:Centreon2 | ||
| - | |||
| - | * ちなみに、Ubuntu 10.04だとmailxがないので、代わりにheirloom-mailxを入れておかないと、CRITICALが出る。 | ||
| - | * mailxが無いとCRITICALが出る。 | ||
| - | * !!apt-get install heirloom-mailx | ||
| - | |||
| - | ===== Webインストール ===== | ||
| - | |||
| - | * アクセス(あたりまえだけど、アドレスは任意) | ||
| - | * http://192.168.1.78/centreon/ | ||
| - | * 説明はWebを見て。 | ||
| - | * http://en.doc.centreon.com/Setup:Centreon2Web | ||
| - | * http://en.doc.centreon.com/Setup:ndoutils2 | ||
| - | * 最後の"Activation of the configuration"で、"Move Export Files"と"Restart Nagios"にチェックを入れてExportするのを忘れないように。 | ||
| - | * SNMPが上手く動いていなくても、多分pingの応答があるから、OKとUnknownの状態に位持ち込めるはず。 | ||
| - | |||
| - | ===== 参考資料 ===== | ||
| - | |||
| - | * http://en.doc.centreon.com/Setup | ||
| - | * http://www.eof.jp/centreon/index.html | ||
