Sun Java System Application Server Enterprise Edition 8 2004Q4 Beta Administration Guide |
Appendix A
Compiling and Configuring Apache Web ServerThis appendix describes how to compile the Apache source code and configure an installation of Apache Web Server to use the Sun Java System Application Server load balancer plug-in.
Download the appropriate Apache source code. For information about the versions and platforms of Apache Web Server supported for Sun Java System Application Server, see the Sun Java System Application Server Release Notes.
This appendix contains the following topics:
Minimum RequirementsThis section describes the minimum 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.
This section contains the following topics:
Minimum Requirements for Apache 1.3
For requirements on Microsoft Windows platforms, see:
http://httpd.apache.org/docs/windows.html#req
http://httpd.apache.org/docs/win_compiling.htmlRequirements for other platforms:
In addition, before compiling Apache:
- On Linux, install Sun Java System Application Server on the same machine.
- On Solaris 8, ensure that
gcc
andmake
are in thePATH
.- On Solaris 9, ensure that
gcc
version 3.3 andmake
are in thePATH
, andflex
is installed.- If you are using
gcc
on Red Hat Enterprise Linux Advanced Server 2.1, make sure you have a version later thangcc
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
Minimum Requirements for Apache 2
For requirements on Microsoft Windows platforms, see http://httpd.apache.org/docs-2.0/platform/windows.html
Requirements for other platforms:
In addition, before compiling Apache:
- On Linux, install Sun Java System Application Server on the same machine.
- On Solaris 8, ensure that
gcc
andmake
are in thePATH
.- On Solaris 9, ensure that
gcc
version 3.3 andmake
are in thePATH
, andflex
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 ApacheFor 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 on other platforms. Although the examples show compiling and building Apache 1.3.29, the same procedures apply for Apache 2.
Compiling and Building Open SSL
Unpack the
openssl-0.9.7c
source and follow these steps.Configuring Apache with mod SSL
Unpack the
mod_ssl-2.8.14-1.3.29
source and follow these steps.The directory specified in the above command is a variable. The prefix argument indicates where to install Apache. This command outputs several lines on the screen.
This command creates the
make
files for the build according to your system configuration. If there are errors inconfigure
, some header files or utility programs may be missing. Install them before proceeding.Compiling and Building Apache
This procedure installs Apache in the location provided in the
--prefix
attribute described in "Configuring Apache with mod SSL."
- Download the
apache_1.3.29
source distribution.Unpack the source distribution. The source distribution comes as a compressed archive. For
apache_1.3.29
, the source distribution archive readsapache_1.3.29.tar.gz
.- Decompress and untar the archive using the following command:
tar -zxvf apache_1.3.29.tar.gz
This command creates a directory called
apache_1.3.29
in your current working directory.- For Apache 1.3 on Linux, include the following lines in
src/MakeFile
afterEnd of automatically generated section
:
LIBS+= -licuuc -licui18n -lnspr4 -lpthread -lxerces-c -lsupport -lnsprwrap -lns-httpd40
LDFLAGS+= -L/
appserver_installdir/lib
- For Apache 2.0 on Linux, modify apache_src
/build/config_vars.mk
and add the following lines:
EXTRA_LIBS += -licuuc -licui18n -lnspr4 -lpthread -lxerces-c -lsupport -lnsprwrap -lns-httpd40
LDFLAGS+=-L<appserver install dir>/lib
- Compile Apache using the
make
command, as follows:
cd apache_1.3.29
make
make certificate
(Apache 1.3 only)make install
The command
make install
outputs several lines on the screen indicating that the process is compiling Apache source code and linking Apache. This process normally concludes without errors. However, if any errors occur, check that 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.After starting Apache, test the installation. Once Apache is running, type the following address in a web browser: http://localhost/. If the installation was successful and Apache is running, a test page is displayed.