BuildForge Help

Apache Installation and Configuration

Use this procedure to download, install, and configure Apache web server for use with the Management Console on UNIX and Linux.

This section includes instructions for you to perform the following steps:

Prerequisites

You need the following in order to perform the tasks in this section:
  • Internet access. If you do not have Internet access from the machine where you are installing Build Forge, you need to download files from a machine that does have access and transfer them to the Build Forge machine to complete the steps.
  • C compiler that is valid and working on your platform (for example, the gcc compiler on Linux).
  • make facility that is suggested by your compiler's manufacturer (for example, gnu-make for use with gcc)
  • Privileges as root (or the user that Apache runs as, if it does not run as root).

Download Apache

To obtain the Apache web server source code:

  1. Download the Apache source code to the intended Build Forge host. Do the following as a non-root user.
    • Make a temporary working directory.
    • Go to http://www.apache.org/
    • Download the version marked Best Available Version
    For example, at this writing the file name is as follows:
    httpd-2.2.4.tar.gz
  2. Extract the image.
    $ gunzip -c httpd-2.2.4.tar.gz | tar xvf -

    Note that tar is set to use stdin for the pipe (using the - parameter)

  3. Go to the newly created working directory
    $ cd httpd-2.2.4

Install Apache

  1. Configure Apache for installation in the working directory you just created.
    $ ./configure --prefix=/usr/local/apache-2.2.4

    This step specifies where Apache will be installed. It is installed in /usr/local by default. The example shows how to put it in /usr/local/apache-2.2.4.

  2. Compile Apache.
    $ make

    This step compiles executables in your local directory.

  3. Install Apache (do as root).
    # make install

    This step must be performed as a user who has write privileges for the directory where Apache is installed (/usr/local/apache-2.2.4 in this example). It is normally done as root. Your local administrative setup may vary.

Edit Apache Configuration Files

Edit Apache vhosts file. Add information about Build Forge in httpd-vhosts.conf.
cd <apache-dir>/conf/extras/
vi httpd-vhosts.conf
Add the following lines:
<VirtualHost *:80>
     ServerAdmin build@yourdomain.com
     DocumentRoot /usr/local/buildforge/ui/public
     ServerName ausbuild01.yourdomain.com
     ServerAlias build.yourdomain.com mc.yourdomain.com #optional server aliases
     ErrorLog logs/ausbuild.error_log
     CustomLog logs/ausbuild.access_log common
</VirtualHost>
  • <VirtualHost *:80>: leave as port 80 (or the port you run HTTP on locally)
    Important: Do not use port 8080; it is the default port for Apache Tomcat.
  • ServerAdmin: email address of the Build Forge administrator
  • DocumentRoot: location of the entry page for the Build Forge application
  • ServerName: server where the Build Forge application is installed
  • ServerAlias: optional aliases for the Build Forge ServerName URL
  • ErrorLog: Apache error log for the Build Forge application
  • CustomLog: Apache error log for logging access to the Build Forge application
To make the Build Forge console pages your document root, update the httpd.conf file in Apache, as follows:
  • Set DocumentRoot in Apache httpd.conf to /usr/local/buildforge/ui
  • Modify the Apache httpd.conf and update the directive to point to /usr/local/buildforge/u

Configure Apache for Your Database

You need to add information to httpd.conf, depending on your database.
  • DB2:
  • MySQL:
  • Oracle:

Apache Configuration for DB2

  1. Add the following line to the beginning of the Apache startup script (normally /etc/init.d/httpd or /etc/init.d/apache2, depending on your distribution).
    source /home/db2bf/sqllib/db2profile
  2. Add the following lines to httpd.conf:
    PassEnv LD_LIBRARY_PATH
    PassEnv CLASSPATH
    PassEnv LIBPATH
    PassEnv VWSPATH

Apache Configuration for MySQL

No additional configuration is required.

Apache Configuration for Oracle

Add the following lines to httpd.conf:
PassEnv LD_LIBRARY_PATH
PassEnv NLS_LANG
PassEnv ORACLE_HOME
PassEnv ORA_NLS
PassEnv ORA_NLS32
PassEnv TNS_ADMIN

Add the following lines to the script that starts Apache at boot time (commonly /etc/init.d/httpd or /etc/init.d/apache2), filling in for <value>:

export LD_LIBRARY_PATH=<value>
export NLS_LANG=<value>
export ORACLE_HOME=<value>
export ORA_NLS=<value>
export ORA_NLS32=<value>
export TNS_ADMIN=<value>