インストール
hobbit ユーザは作成済み。libpng と Apache2 はインストール済み。LDAP サーバは監視しない(OpenLDAP は入れない)と仮定。
下記、それぞれの URL から最新版を入れる事。
fping
wget http://www.fping.com/download/fping.tar.gz tar -zxvf fping.tar.gz cd fping-2.4b2_to/ ./configure make make install
libart
RRDtool を入れるのに必要。
http://www.linuxfromscratch.org/blfs/view/cvs/general/libart_lgpl.html
wget http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/libart_lgpl-2.3.17.tar.gz tar -zxvf libart_lgpl-2.3.17.tar.gz cd libart_lgpl-2.3.17 ./configure make make install
RRDtool の configure オプションがよく解らなかったので・・・下記のように対応。
ln -s /usr/local/include/libart-2.0 /usr/include/libart-2.0
RRDtool
http://oss.oetiker.ch/rrdtool/
wget http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.2.12.tar.gz tar -zxvf rrdtool-1.2.12.tar.gz cd rrdtool-1.2.12 ./configure make make install
PCRE
wget http://jaist.dl.sourceforge.net/sourceforge/pcre/pcre-6.3.tar.gz tar -zxvf pcre-6.3.tar.gz cd pcre-6.3 ./configure make make install
OpenSSL
wget http://www.openssl.org/source/openssl-0.9.8b.tar.gz tar -zxvf openssl-0.9.8b.tar.gz cd openssl-0.9.8b ./config shared make make test make install
shared オプションを忘れると、Hobbit が https のテスト等ができなくなる。
Hobbit
http://sourceforge.net/projects/hobbitmon/
wget http://jaist.dl.sourceforge.net/sourceforge/hobbitmon/hobbit-4.2-beta-20060605.tar.gz tar -zxvf hobbit-4.2-beta-20060605.tar.gz cd hobbit-4.2-beta-20060605 ./configure make make install
configure コマンドは対話式。
クライアントだけインストールしたい場合は、configure のオプションに --client を付ける。
その場合、hobbit 以外はインストール不要・・・のハズ。
AIX や FreeBSD 等にインストールする場合は、./configure 実行時に、MAKE 環境変数へ gmake を設定する。
(MAKE=gmake ./configure とか)
無事インストール後、httpd.conf に・・・
Include conf/extra/httpd-hobbit.conf
と追加して、下記のような httpd-hobbit.conf を作成する。
Alias /hobbit/ "/home/hobbit/server/www/" <Directory "/home/hobbit/server/www/"> Options Indexes FollowSymLinks Includes MultiViews Order allow,deny Allow from all </Directory> ScriptAlias /hobbit-cgi/ "/home/hobbit/cgi-bin/" <Directory "/home/hobbit/cgi-bin"> AllowOverride None Options ExecCGI Includes Order allow,deny Allow from all </Directory> ScriptAlias /hobbit-seccgi/ "/home/hobbit/cgi-secure/" <Directory "/home/hobbit/cgi-secure"> AllowOverride None Options ExecCGI Includes Order allow,deny Allow from all AuthUserFile /home/hobbit/server/etc/hobbitpasswd AuthType Basic AuthName "Hobbit Administration" Require valid-user </Directory>
Apache 再起動後、server/etc/bb-hosts 等を適当に編集して、sever/hobbit.sh を実行する。
hobbit サーバ自身の CPU 使用率等を確認したい場合は、client/runclient.sh を実行する。
FQDN と、監視設定の名前が異なる場合は、runclient.sh に --hostname オプションを追加する。
runclient.sh --hostname=hobbit
細かい設定方法は、また今度・・・。
FreeBSD にインストールする場合、Ports からインストールできるようになった。
まだ、クライアントしか試していないが、下記のようなコマンドでインストールできた。
% BBHOSTIP=XXX.XXX.XXX.XXX portinstall net-mgmt/hobbit-client
BBHOSTIP は、省略すると 127.0.0.1 が設定される。
インストール先は、/usr/local/www/hobbit/client/
/etc/rc.conf に hobbit_client_enable="YES" を加えて /usr/local/etc/rc.d/hobbit-client start で起動。