Previous Contents Index Next |
Sun Java System Application Server 7 2004Q2 Update 1 Standard and Enterprise Edition Administration Guide

> ## Appendix C
> Compiling and Configuring Apache Web Server (Enterprise Edition)

> This appendix describes how you should compile the Apache source code and configure your installation of Apache Web Server to use Sun Java™ System Application Server 7, Enterprise Edition load balancer plug-in.

> You must download the appropriate Apache source code for the platform on which you want to run Apache Web Server. The load balancer plug-in is certified to work with Apache 1.3.29 and 2.0.49 on the following platforms:

> - Solaris 8 & 9 SPARC
> - Solaris 9 x86
> - Red Hat Enterprise Linux Advanced Server 2.1
> - Microsoft Windows 2000 Server Service Pack 2, Windows 2000 Advanced Server Service Pack 2, Windows 2000 Professional Service Pack 2

> This appendix contains the following topics:

> - Minimum Requirements
> - Installing SSL-aware Apache

> ##

> Minimum Requirements

> You must meet the following requirements to successfully compile Apache web server to run the load balancer plug-in. The Apache source must be compiled and built to run with SSL. Requirements for Apache 1.3 and Apache 2 are slightly different. These are listed separately in this section. Requirements common to both versions of Apache are listed under Requirements Common to Apache 1.3 and 2.

> ### Minimum Requirements for Apache 1.3

> - openssl-0.9.7c (source)
> - mod_ssl-2.8.16-1.3.29 (source)
> - apache_1.3.29 (sources)
> - For requirements on Microsft Windows platforms, see http://httpd.apache.org/docs/windows.html#req http://httpd.apache.org/docs/win_compiling.html

> ### Minimum Requirements for Apache 2

> - openssl-0.9.7d (source)
> - httpd-2.0.49 (source)
> - For requirements on Microsft Windows platforms, see http://httpd.apache.org/docs-2.0/platform/windows.html

> ### Requirements Common to Apache 1.3 and 2

> - gcc-3.3-sol9-sparc-local packages (for Solaris 9 SPARC/x86).
> - flex-2.5.4a-sol9-sparc-local packages (for Solaris 9 SPARC)
> - flex-2.5.4a-sol9-intel-local packages (for Solaris 9 x86)
> - Sun Java System Application Server 7, Enterprise Edition installables.

> Before compiling Apache on Linux, ensure that you have an installation of Sun Java System Application Server Enterprise Edition on the same machine.

> - On Solaris 8, ensure that gcc and make are in the PATH.
> - On Solaris 9, ensure that gcc version 3.3 and make are in the PATH, and flex is installed.
> - If you are using gcc On Red Hat Enterprise Linux Advanced Server 2.1, make sure you have a version later than gcc 3.0.

> Note | To use another C compiler, set the path of the C compiler and make utility in the PATH environment variable. For example: exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:appserver_installdir/lib These software sources are available at http://www.sunfreeware.com

> ##

> Installing SSL-aware Apache

> The procedures described in this section are common to both Apache 1.3 and 1, except where specifically mentioned. Although, the examples show compiling and building Apache 1.3.29, the same procedures apply for Apache 2.

> For instructions on compiling and installing Apache on Microsoft Windows platforms, see the following web sites:

> - Apache 1.3: http://httpd.apache.org/docs/win_compiling.html
> - Apache 2: http://httpd.apache.org/docs-2.0/platform/win_compiling.html

> Follow these steps to compile, configure, and install SSL-aware Apache web server.

> - Compiling and Building Open SSL
> - Configuring Apache with mod SSL
> - Compiling and Building Apache
> - Starting and Stopping Apache

> ### Compiling and Building Open SSL

> Unpack the openssl-0.9.7c source and follow these steps.

> 1. cd openssl-0.9.7c
> 2. ./config
> 3. make

> ### Configuring Apache with mod SSL

> Unpack the mod_ssl-2.8.14-1.3.29 source and follow these steps.

> 1. cd mod_ssl-2.8.14-1.3.29
> 2. run ./configure --with-apache=../apache_1.3.27--with-ssl=../openssl-0.9.7c --prefix=<install path> --enable-module=ssl --enable-shared=ssl --enable-rule=SHARED_CORE --enable-module=so

> The directory specified in the above command is a variable. You can specify the path where you install Apache. The prefix argument indicates where you wish to install Apache. This command will output several lines on the screen.Essentially this command creates the make files for the build according to your system configuration. If there are errors in configure, you may be missing some header files or utility programs which you must install before proceeding.

> ### Compiling and Building Apache

> 1. Download the apache_1.3.29 source distribution.

> Unpack the source distribution. The source distribution comes as a compressed archive. If you are installing apache_1.3.29, the source distribution archive will read apache_1.3.29.tar.gz.

> 2. Decompress and untar the archive using the following command:

> tar -zxvf apache_1.3.29.tar.gz

> This command will create a directory called apache_1.3.29 in your current working directory.

> 3. Compile Apache using the make command, as follows:
> 1. cd apache_1.3.29
> 2. make
> 3. make certificate

> Note | On Apache 2, instead of running the command, make certificate, copy and untar ssl.tar to apache_install_path/conf folder. Edit ssl.conf to point the SSLCertificateFile property to the location of ssl.crt/server.crt.

> 4. make install

> This installs apache in the location provided in the --prefix attribute in Configuring Apache with mod SSL.

> Note | On Linux, include the following lines in src/MakeFile after End of automatically generated section LIBS+= -licuuc -licui18n -lnspr4 -lpthread -lxerces-c -lsupport -lnsprwrap -lns-httpd40 LDFLAGS+= -L/appserver_installdir/lib These settings must be performed before executing Step 3. make certificate would ask for a secure password. Remember this password as it’s required for starting secure Apache.

> The command make install will output several lines on the screen indicating that the process is compiling Apache source code and linking Apache. This process should normally conclude without errors. However if any errors occur, please check if all the library files and utility programs of Apache have been properly downloaded.

> Configure this installation of Apache by entering the appropriate values for your environment in the apache_install_path/conf/httpd.conf file.

> ### Starting and Stopping Apache

> Apache comes bundled with a script titled apachectl that facilitates starting, stopping and restarting Apache.

> Run the follow command to start Apache:

> apache_install_dir/bin/apachectl start

> Run the follow command to start Apache in SSL mode:

> apache_install_dir/bin/apachectl startssl

> To stop apache, run the following command:

> apache_install_dir/bin/apachectl stop

> After you start, you can test your installation of Apache. Once Apache is running, type the following address in your web browser: http://localhost/. If your installation was successful and Apache is running, you should see a test page displaying a message to that effect.

> Now you are ready to install the loadbalancer plug-in. To install and configure the loadbalancer plug-in, follow instructions in Chapter 17, "Configuring HTTP Load Balancing and Failover (Enterprise Edition)."

> Previous Contents Index Next

> Copyright 2004 Sun Microsystems, Inc. All rights reserved.