To use Apache Web Server, you must perform certain configuration steps before installing the load balancer plug-in. The load balancer plug-in installation also makes additional modifications to the Apache Web Server. After the plug-in is installed, you must perform additional configuration steps.
On Apache 1.3, when more than one Apache child processes runs, each process has its own load balancing round robin sequence. For example, if there are two Apache child processes running, and the load balancer plug-in load balances on to two application server instances, the first request is sent to instance #1 and the second request is also sent to instance #1. The third request is sent to instance #2 and the fourth request is sent to instance #2 again. This pattern is repeated (instance1, instance1, instance2, instance2, etc.)This behavior is different from what you might expect, that is, instance1, instance2, instance1, instance2, etc. In Sun Java System Application Server, the load balancer plug-in for Apache instantiates a load balancer instance for each Apache process, creating an independent load balancing sequence.
Apache 2.0 has multithreaded behavior if compiled with the --with-mpm=worker option.
For the Apache Web Server, your installation must meet the minimum requirements, depending on the version of Apache.
With Apache 1.3, the load balancer plug-in requires:
openssl-0.9.7e (source)
mod_ssl-2.8.16-1.3.x (source), where x represents the version of Apache. The mod_ssl version must match the Apache version.
gcc-3.3-sol9-sparc-local packages (for Solaris SPARC)
gcc-3.3-sol9-intel-local packages (for Solaris x86)
flex-2.5.4a-sol9-sparc-local packages (for Solaris SPARC)
flex-2.5.4a-sol9-intel-local packages (for Solaris x86)
The software sources are available at http://www.sunfreeware.com
In addition, before compiling Apache:
On the Linux platform, install Sun Java System Application Server on the same machine.
On the Solaris operating system, ensure that gcc version 3.3 and make are in the PATH, and flex is installed.
On the Solaris 10 operating system, before running make for OpenSSL, run mkheaders, located in /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/install-tools on Solaris SPARC or /usr/local/lib/gcc-lib/i386-pc-solaris2.9/3.3/install-tools on Solaris x86.
If you are using gcc on Red Hat Enterprise Linux Advanced Server 2.1, the version must be later than gcc 3.0.
To use C compiler other than gcc, set the path of the C compiler and make utility in the PATH environment variable. For example, with the sh shell: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:appserver_installdir/lib
With Apache 2.0, the load balancer plug-in requires:
openssl-0.9.7e (source)
httpd-2.0.49 (source)
gcc-3.3-sol9-sparc-local packages (for Solaris SPARC).
gcc-3.3-sol9-intel-local packages (for Solaris x86)
flex-2.5.4a-sol9-sparc-local packages (for Solaris SPARC)
flex-2.5.4a-sol9-intel-local packages (for Solaris x86)
The software sources are available at http://www.sunfreeware.com
In addition, before compiling Apache:
On the Linux platform, install Sun Java System Application Server on the same machine.
On the Solaris operating system, ensure that gcc version 3.3 and make are in the PATH, and flex is installed.
On the Solaris 10 operating system, before running make for OpenSSL, run mkheaders, located in /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/install-tools on Solaris SPARC or /usr/local/lib/gcc-lib/i386-pc-solaris2.9/3.3/install-tools on Solaris x86.
If you are using gcc on Red Hat Enterprise Linux Advanced Server 2.1, the version must be later than gcc 3.0.
To use a C compiler other than gcc, set the path of the C compiler and make utility in the PATH environment variable. For example, with the sh shell:export LD_LIBRARY_PATH= app_server_install_dir/lib:$LD_LIBRARY_PATH.
Before installing the load balancer plug-in for Apache, install the Apache Web Server. The Apache source must be compiled and built to run with SSL. This section describes the minimum requirements and high-level steps needed to successfully compile Apache Web Server to run the load balancer plug-in. These requirements and steps only apply to the Solaris and Linux versions of the software. For information on the Windows version of Apache, see the Apache web site.
You must have already downloaded and uncompressed the Apache software.
Download and unpack the OpenSSL source.
Compile and build OpenSSL.
This step is not required on the Linux platform if OpenSSL 0.9.7.e is installed.
Enter these commands:
cd openssl-0.9.7e make make install |
For more information about OpenSSL, see the http://www.openssl.org/.
Follow one of these procedures, depending on the version of Apache:
For Apache 1.3, configure Apache with mod_ssl with the following steps:
Unpack the mod_ssl source.
cd mod_ssl-2.8.14–1.3.x
./configure –with-apache=../apache_1.3.x --with-ssl=../openssl-0.9.7e --prefix=install_path --enable-module=ssl --enable-shared=ssl --enable-rule=SHARED_CORE --enable-module=so
In the above commands, x is the Apache version number, and install_path is the directory in which to install Apache.
For more information on mod_ssl, see http://www.modssl.org.
For Apache 2.0, configure the source tree:
For Apache on Linux 2.1, before compiling:
Open src/MakeFile and find the end of the automatically generated section.
Add the following lines after the first four lines after the automatically generated section:
LIBS+= -licuuc -licui18n -lnspr4 -lpthread -lxerces-c -lsupport -lnsprwrap -lns-httpd40 LDFLAGS+= -L/appserver_installdir/lib -L/opt/sun/private/lib
Note that -L/opt/sun/private/lib is only required if you installed Application Server as part of a Java Enterprise System installation.
For example:
## (End of automatically generated section) ## CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS) LIBS=$(EXTRA_LIBS) $(LIBS1) INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES) LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS) "LIBS+= -licuuc -licui18n -lnspr4 -lpthread -lxerces-c -lsupport -lnsprwrap -lns-httpd40 LDFLAGS+= -L/appserver_installdir /lib -L/opt/sun/private/lib
Set environment variable LD_LIBRARY_PATH.
With all installations, set it to: appserver_install_dir/lib
With Java Enterprise System Installations, set it to appserver_install_dir/lib:opt/sun/private/lib .
Compile Apache as described in the installation instructions for the version you are using.
For more information, see the http://httpd.apache.org/
In general the steps are:
Configure Apache for your environment.
The load balancer plug-in installation program extracts the necessary files to a directory in the web server’s root directory:
For Apache 1.3, the directory is libexec.
For Apache 2.0, the directory is modules .
It adds the following entries to the web server instance’s httpd.conf file:
<VirtualHost machine_name:443> ##Addition for EE lb-plugin LoadFile /usr/lib/libCstd.so.1 LoadModule apachelbplugin_module libexec/mod_loadbalancer.so #AddModule mod_apachelbplugin.cpp <IfModule mod_apachelbplugin.cpp> config-file webserver_instance/conf/loadbalancer.xml locale en </IfModule> <VirtualHost machine_ip_address> DocumentRoot "webserver_instance/htdocs" ServerName server_name </VirtualHost> ##END EE LB Plugin ParametersVersion 7
Apache Web Server must have the correct security files to work well with the load balancer plug-in.
Create a directory called sec_db_files under apache_install_dir.
Copy application_server_domain_dir /config/*.db to apache_install_dir /sec_db_files.
Depending on the platform, perform additional configuration.
On the Solaris platform:
Add the path /usr/lib/mps/secv1 to LD_LIBRARY_PATH in the apache_install_dir/bin/apachectl script. The path must be added before /usr/lib/mps.
On Linux:
Add the path /opt/sun/private/lib to LD_LIBRARY_PATH in the apache_install_dir/bin/apachectl script. The path must be added before /usr/lib.
On Microsoft Windows:
Add a new path to the Path environment variable.
Click Start->Settings->Control Panel->System->Advanced->Environment Variables->System Variables.
Add application_server_install_dir /bin to the Path environment variable.
Set the environment variable NSPR_NATIVE_THREADS_ONLY to 1.
In the Environment Variables window, under System Variables, click New. Enter Variable name of NSPR_NATIVE_THREADS_ONLY and Variable value of 1.
Restart the machine.