TOPサーバ構築・運用> bbgenインストール手順
Big Brother
Big Brotherによるネットワーク監視

第10回:究極のBB機能拡張bbgen
著者:イー・モバイル  矢萩 茂樹   2006/8/11
前のページ  1  2  3   4  次のページ
bbgenインストール手順

   bbgenをインストールする際には、bbgenのコンパイルとインストールだけでなく、BB本体へのパッチあてと再コンパイル、そして関連するスクリプトの差し替えという手順が必要となります。今回はBB 1.9hサーバ+larrd 0.43dの環境にbbgenをインストールすることとし、以下の手順に従い説明していきます。
  1. 現BBのバックアップ
  2. ダウンロードとファイルの展開
  3. configureスクリプトによる設定とコンパイル
  4. bbgen起動スクリプトのコピー
  5. fpingに関する設定
  6. bbdへのパッチあてとコンパイル
  7. bbgen版bbdのインストールとBBSVRの再起動

表2:インストール手順


1. 現BBのバックアップ

   bbgenはBBDISPLAY/BBNETサーバのソースコードにパッチをあてて機能拡張を行います。関連するほとんどのプログラムは差分コードが組み込まれるか別のスクリプトにリプレースされることになります。またインストールも少々複雑な手順を踏むことになるので、インストールを最初からやり直す際やオリジナルのBBに戻すためにバックアップが必須です。

   今回は/home/bb/server-backupディレクトにバックアップする手順を以下に示します。

$ mkdir /home/bb/server-backup
$ cd /home/bb/server
$ cp -R ./* ../server-backup
$ mkdir /home/bb/server-backup/cgi-bin
$ cd /usr/local/www/cgi-bin
$ cp bb* larrd* /home/bb/server-backup/cgi-bin


2. ダウンロードとファイルの展開

   次にbbgenを以下のサイトからダウンロードしましょう。


   ダウロードするファイルはbbgen-3.6.tar.gzです。ここではbbアカウントの/home/bbディレクトリにダウンロードし、以下のようにファイルを展開します。

$ cd /home/bb
$ tar xzvf bbgen-3.6.tar.gz


3. configureスクリプトによる設定とコンパイル

   展開後はオープンソースソフト定番の「configure;make;make install」の手順をふみます。./configureは対話型スクリプトとなっています。

リスト1
$ cd /home/bb/bbgen-3.6
$ ./configure
Configuration script for bbgen
This script asks a few questions and builds a Makefile to compile bbgen

Where is your Big Brother BB/HOME directory [/usr/local/bb] ?
/home/bb/server
OK, your BBHOME looks good

Where is your Webserver CGI-BIN directory [/var/apache/cgi-bin] ?
/var/www/cgi-bin
OK, your CGIDIR looks good

Which graphs to show by default (1d/1w/4w/1y/all) [all]

Use the standard Big Brother history graph (y/n) [y] ? n
   What width should I use for the graph [960] ?

Do you want to be able to test SSL-enabled services (y) ?

Do you want to be able to test LDAP servers (y) ?

Enable experimental support for LDAP/SSL (OpenLDAP 2.x only) (y) ?

Where should I install the bbgen man-pages (/usr/local/man) ?

Created Makefile with the necessary information to build bbgen.
If you need to change settings, you should change the Makefile

Configuration complete - now run 'make' to build the tools

   次にリスト1の内容について解説します。以下はBBサーバのHOMEディレクトリを指定しています。今回の例では/home/bb/serverとなります。

Where is your Big Brother BB/HOME directory [/usr/local/bb] ?

   BBサーバのCGI-BINディレクトリを指定します。今回の例では/var/www/cgi-binとなります。

Where is your Webserver CGI-BIN directory [/var/apache/cgi-bin] ?

   障害履歴画面で表示するグラフを指定します。ここはすべてのグラフをデフォルトで表示する「all」でほぼ問題ないかと思います。

Which graphs to show by default (1d/1w/4w/1y/all) [all]

   BBの障害履歴画面はサマリー期間が長くなると、小さな障害履歴は集約されて見えなくなります。bbgenは精度を上げた形で小さな障害も丸め込まれづらいような処理を行うことができます。bbgen版の処理を行う場合には「n」とします。bbgen版の処理を選択すると障害履歴画面の横幅のビットサイズを指定します。

Use the standard Big Brother history graph (y/n) [y] ? n
   What width should I use for the graph [960] ?

   SSL経由のサービス機能試験を実施するかを指定します。

Do you want to be able to test SSL-enabled services (y) ?

   LDAP試験機能を行うかの指定をします。

Do you want to be able to test LDAP servers (y) ?

   LDAPのサポートバージョンを指定しています。

Enable experimental support for LDAP/SSL (OpenLDAP 2.x only) (y) ?

   bbgen manファイルのインストール先を指定します。

Where should I install the bbgen man-pages (/usr/local/man) ?


GNU make

   configureスクリプト後のコンパイルにはGNU makeが必要になります。「make --version」を実行してバージョンが表示されなければ、GNU makeではない可能性が高いので、gmake(GNU make)をports/packageなどからインストールしてください。

リスト2:make/gmakeの区別
$ make --version
make: illegal option -- -
usage: make [-BPSXeiknqrstv] [-C directory] [-D variable] [-d flags]
   [-E variable] [-f makefile] [-I directory] [-j max_jobs]
   [-m directory] [-V variable] [variable=value] [target ...]
$ gmake --version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

   コンパイルが成功したらgmake installを実行しますが、システムのcgi-binや/usr/local/manにbbgenのファイルをインストールするので、root権限で実施してください。

$ gmake
$ su
password: ********
# gmake install
# exit

前のページ  1  2  3   4  次のページ


イー・モバイル株式会社 矢萩 茂樹
著者プロフィール
イー・モバイル株式会社  矢萩 茂樹
2000年、個人で使えるメガレベルのサービスの可能性を目のあたりにしてADSL事業の立ち上げに参加。ADSLによるブロードバンドIPネットワークの設計・企画に従事。その関連業務で気軽に使えるネットワーク監視手法が必要となり、派生的結果としてオープンソースベースのツールをInternetWeekなどで紹介するに至る。現在、空気媒体のブロードバンド実現に向けて奮闘中。


INDEX
第10回:究極のBB機能拡張bbgen
  bbgenとは
  bbgenのインストールに必要なソフトウェア
bbgenインストール手順
  4. bbgen起動スクリプトのコピー