Installation

 Top

 Step 1: Compilation

  • Get the mod_benchmark archive (mod_benchmark-2.0.tar.gz) and expand it under a directory (for example /usr/local/) with the commands

    # cd /usr/local
    # tar xvfz mod_benchmark-2.0.tar.gz
    # cd mod_benchmark-2.0

  • Run ./configure with at least one of these options:

    --with-apxs=[path to apxs]     (for Apache 1.x) or
    --with-apxs2=[path to apxs]    (for Apache 2.x)

    If you plan to store the indicator values in a Database (see Concepts), you must enable one of the following Database interface:

    --enable-mysql --with-mysqldir=[dir] --with-mysqllib=[dir]
    --enable-sybase --with-sybasedir=[dir] --with-sybaselib=[dir]
    --enable-pgsql --with-pgsqldir=[dir] --with-pgsqllib=[dir]
    --enable-oracle --with-oracledir=[dir] --with-oraclelib=[dir]

    Example:

    ./configure --enable-mysql --with-mysqldir=/usr/include/mysql \
                --with-mysqllib=/usr/lib/mysql --with-apxs=/usr/sbin/apxs

    Note: if you plan to use a Sybase Database, we strongly recommend the FreeTDS interface (available at http://www.freetds.org since the standard Sybase API is not multithreaded.
    This software has been successfully tested with FreeTDS version 0.61.

  • Run make
  • Run make install

    apxs will copy the module and the related files (mod_benchmark.so, sysstat2, an optional Database module interface and benchmark_rt) under the Apache module directory.

    The LoadModule/AddModule Apache directives will also be added in the Server Configuration File:

    # for Apache 1.x:
    LoadModule benchmark_module modules/mod_benchmark.so
    AddModule mod_benchmark.c

    # for Apache 2.x:
    LoadModule benchmark_module libexec/mod_benchmark.so

  • Adjust the owner and group name of the newly added files under the Apache "libexec" or "modules" directory.

 Step 2: Database Creation (optional)

This step is required only if you plan to store the indicator values in a Database (see Concepts)

  • Choose an existing Database or create a new one
     
  • Run the sql/mod_benchmark-{mydb}.sql script to create the tables in the Database.
     
  • Create a user/passwd that can access these tables with the INSERT,SELECT and DELETE access rights.
     
  • If you want to use the PHP Web-based interface, go to the benchmark/php directory then edit the globals.inc.php file.
    If you want to use the Perl Web-based interface, go to the benchmark/perl directory then edit the globals.inc.pl file.

    This file contains several global parameters that can be customized. In particular, you must indicate the four parameters needed by the PHP and Perl scripts to connect to the Database.
     
  • If you have configured an Oracle Database, make sure the scripts will be able to know the value of ORACLE_HOME and ORACLE_SID variables.

    A possible method is to add the following directives in the Apache Configuration File:

    SetEnv ORACLE_HOME /path/to/oracle/home
    SetEnv ORACLE_SID theSID


    or you can create these environment variables in the Apache startup script (usually /etc/init.d/httpd).
     
  • For a Sybase Database, you may need to define the DSQUERY environment variable.

    A possible method is to add a SetEnv DSQUERY ServerName directive in the Apache Configuration File or to create this environment variable in the Apache startup script.
     
  • To get last-minute information, we strongly suggest that you consult the sql/INSTALL.sql file from the current distribution

 Step 3: Web-based interface (optional)

This step is required only if you plan to store the indicator values in a Database (see Concepts)

  • Control Panel installation:
    • If you plan to use the PHP Web-based interface (the "Control Panel"):

      You must copy the benchmark/php directory where you want under Apache server tree. For example:

      # cd benchmark/php
      # cp -r * /usr/local/httpd/benchmark


    • If you plan to use the Perl Web-based interface:

      You must copy the benchmark/perl directory where you want under Apache server tree. For example:

      # cd benchmark/perl
      # cp -r * /usr/local/httpd/benchmark


  • Then change the owner and group of the newly created "benchmark" directory to reflect the values normally used by your Apache Server. For example:

    # cd /usr/local/httpd
    # chown -R wwwrun.wwwgrp benchmark
    # chmod -R og-rwx benchmark

 Step 4: Apache Server Configuration

  • Configure the Apache Server as explained in the Configuration document.
    But for a first test, you can use the default values.
     
  • Restart Apache:
    # /etc/init.d/httpd restart

    If the server does not restart successfully, consult the troubleshooting section.

 Step 5: Big-Brother Integration (optional)

This step is mandatory if you plan to display and receive alerts from Big-Brother.

The integration process is fully described in the bigbrother document.


www.trickytools.com