Apache HTTP Server 安装和配置

Installation Manager 安装并配置 Apache HTTP Server 作为 Build Forge 的 Web 服务器。使用提供的 Apache HTTP Server 是为 Build Forge 配置 Web 服务器的最快的方法。

作为标准配置的备选方法,可以配置现有的 Apache HTTP Server 代替 Build Forge 安装和配置的服务器。提供的指示信息假定您具有在操作系统上设置和配置 Apache HTTP Server 的经验。

要使用现有的 Apache HTTP Server,请按如下所示修改您的安装:

  1. 修改 Apache HTTP Server 配置文件(httpd-vhosts.conf)以指向 Build Forge 应用程序。
  2. 安装 PHP 并配置 Apache HTTP Server、Build Forge 数据库以及密码加密(如果希望使用此安全性功能)所需的 PHP 模块。
  3. 为您的数据库配置 Apache。

使用 Installation Manager 安装 Build Forge

在 Installation Manager 中的“应用程序和 Web 服务器配置”页面的提供您自己的 Web 服务器提示处,选择

必备软件

编辑 Apache 服务器配置文件

  1. 在服务器安装的 extras 目录中查找 Apache http-vhosts.conf 文件。
    cd <apache-dir>/conf/extras/
    vi httpd-vhosts.conf
  2. 编辑 Apache http-vhosts.conf 文件。要将关于 Build Forge 的信息添加到 httpd-vhosts.conf 中,请添加以下行:
    <VirtualHost *:80>
      ServerAdmin build@yourdomain.com
      DocumentRoot /opt/buildforge/webroot/public
    	 ServerName ausbuild01.yourdomain.com
      ServerAlias build.yourdomain.com mc.yourdomain.com 
      ErrorLog logs/ausbuild.error_log
      CustomLog logs/ausbuild.access_log common
    </VirtualHost>
  3. 修改 DocumentRoot 设置以指向 Build Forge Web 应用程序。 在该示例中,Build Forge 安装目录为 /opt/buildforge。
  4. 保留端口为 80 或将其更改为用于本地运行 Apache HTTP Server 的端口。

    <VirtualHost *:80>

    要点: 请勿使用端口 8080;它是 Apache Tomcat 的缺省端口。
  5. 根据 Apache HTTP Server 的需要,修改 http-vhosts.conf 中的其他任何设置:
    • ServerAdmin:Build Forge 管理员的电子邮件地址
    • DocumentRoot:Build Forge 应用程序的条目页面的位置
    • ServerName:安装有 Build Forge 应用程序的服务器
    • ServerAlias:Build Forge ServerName URL 的可选别名
    • ErrorLog:Build Forge 应用程序的 Apache 错误日志
    • CustomLog:用于记录对 Build Forge 应用程序的访问的 Apache 错误日志

为 Apache HTTP Server 安装并配置 PHP

PHP 不是与 Apache HTTP Server 一起安装的。您必须安装 PHP 5.2.4 并将其配置为指向 Apache HTTP Server 的 httpd-vhosts.conf。

为 Build Forge 数据库安装并配置 PHP

PHP 安装期间,为您正在作为 Build Forge 数据库使用的数据库类型选择和安装 PHP 扩展。

(可选)配置 PHP OpenSSL 模块以支持密码加密

要支持 SSL,Build Forge 使用 PHP OpenSSL 模块。 此支持是随 PHP 5.2.4 提供的;不需要额外配置。

要支持密码加密,需要一些额外配置。PHP 5.2.4 是支持此配置所必需的。您必须查找 OpenSSL 扩展的补丁文件,将这些补丁文件安装到 OpenSSL 目录中,并重新编译 PHP,如下所示:
  1. 在位于 Build Forge 安装目录的 misc 目录中查找 php_openssl.h 和 openssl.c 补丁文件,例如:
    Windows C:\Program Files\IBM\Build Forge\misc
    UNIX/Linux /opt/buildforge/Platform/misc
  2. 将补丁文件复制到位于 Build Forge 安装目录的 openssl 目录中。
  3. 使用 --with-openssl=<path_to_openssl> 配置选项编译 PHP,其中 <path_to_openssl> 是 Build Forge openssl 目录。

为您的数据库配置 Apache

您需要向 httpd.conf 添加特定信息,具体取决于您的数据库。

DB2 的 Apache 配置
  1. 向 Apache 启动脚本(通常是 /etc/init.d/httpd 或 /etc/init.d/apache2,具体取决于您的分发)的开头部分添加以下行。
    source /home/db2bf/sqllib/db2profile
  2. httpd.conf 添加以下行:
    PassEnv LD_LIBRARY_PATH
    PassEnv CLASSPATH
    PassEnv LIBPATH
    PassEnv VWSPATH
MySQL 的 Apache 配置

不需要任何额外配置。

Oracle 的 Apache 配置
  1. 向 httpd.conf 添加以下行:
    PassEnv LD_LIBRARY_PATH
    PassEnv NLS_LANG
    PassEnv ORACLE_HOME
    PassEnv ORA_NLS
    PassEnv ORA_NLS32
    PassEnv TNS_ADMIN
  2. 向在引导时启动 Apache 的脚本(通常是 /etc/init.d/httpd 或 /etc/init.d/apache2)添加以下行,并提供以下设置的值。
    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>

启动 IBM HTTP Server

启动 Build Forge 引擎并启动管理控制台之前,启动您的 Apache HTTP Server。


反馈