Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Administration Guide

- Previous: Chapter 17 Java Virtual Machine and Advanced Settings
- Next: Chapter 19 Automatically Restarting a Domain or Node Agent

# Installing Apache

This section contains the following topics:

- Minimum Requirements for Apache 1.3

- Minimum Requirements for Apache 2

- To install SSL-aware Apache

## Minimum Requirements for Apache 1.3

This section describes the minimum requirements to successfully compile Apache 1.3 web server to run the load balancer plug-in. The Apache source must be compiled and built to run with SSL.

Requirements for UNIX and Linux platforms:

- `openssl-0.9.7` `d` (source)

- `mod_ssl-2.8.16-1.3.29` (source)

- `apache_1.3.29` (sources)

- `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)

In addition, before compiling Apache:

- On Linux, install the Sun Java System Application Server 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, the version must be 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:

  export `LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`install-dir`/lib`

- These software sources are available at `http://www.sunfreeware.com`.

## Minimum Requirements for Apache 2

This section describes the minimum requirements to successfully compile Apache 2 web server to run the load balancer plug-in. The Apache source must be compiled and built to run with SSL.

Requirements for UNIX and Linux platforms:

- `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)

In addition, before compiling Apache:

- On the Linux platform, install the 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 `/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/install-tools/mkheaders` (Solaris SPARC) or `/usr/local/lib/gcc-lib/i386-pc-solaris2.9/3.3/install-tools/mkheaders` (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.

Note –

- To use another C compiler, set the path of the C compiler and make utility in the PATH environment variable. For example:`export LD_LIBRARY_PATH=`install-dir`/lib:$LD_LIBRARY_PATH`. This example is for `sh`.

- These software sources are available at `http://www.sunfreeware.com`.

## To install SSL-aware Apache

##### Before You Begin

You must have already downloaded and uncompressed the Apache software.

1. Compile and build OpenSSL. For more information about OpenSSL, see `http://www.openssl.org/`.

   This step is not required on the Linux platform if the version of OpenSSL installed with Linux is 0.9.7.e.

   Download and unpack the OpenSSL source.

   1. `cd openssl-0.9.7e`

   2. `make`

   3. `make install`

2. For Apache 1.3, configure Apache with `mod_ssl`. You do not need to complete this step for Apache 2. For more information about `mod_ssl`, see `http://www.modssl.org/`.

   Unpack the `mod_ssl` source and follow these steps.

   1. `cd mod_ssl-2.8.14-1.3.x`

   2. Run `./configure --with-apache=../apache_1.3.`x `--with-ssl=../openssl-0.9.7e --prefix=`install-dir`--enable-module=ssl --enable-shared=ssl --enable-rule=SHARED_CORE --enable-module=so`

      The directory specified in the above command example is a variable. The prefix argument indicates where to install Apache. The x in the version number represents your actual version.

3. For Apache 2.0, configure the source tree:

   1. cd to the `http-2.0_`x directory.

   2. Run `./configure --with-ssl=`open-ssl-install-path `--prefix=`install-dir `--enable-ssl --enable-so`

      The directory specified in the above command example is a variable. The prefix argument indicates where to install Apache. The x in the version number represents your actual version.

4. For Apache on Linux 2.1, before compiling:

   1. Open `src/MakeFile` and find the end of the automatically generated section.

   2. 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/`install-dir`/lib -L/opt/sun/private/lib`

      Note –

      The `-L/opt/sun/private/lib` part 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-httpd40LDFLAGS+= -L/`install-dir`/lib -L/opt/sun/private/lib`

   3. Create an environment variable LD_LIBRARY_PATH equal to: install-dir`/lib` (for all installations) and install-dir`/lib:opt/sun/private/lib` (for Application Server installed as part of a Java Enterprise System installation).

5. Compile Apache as described in the installation instructions for the version you are using. Full documentation is at `http://httpd.apache.org/`.

   In general the steps are:

   1. `make`

   2. `make certificate` (Apache 1.3 only)

   3. `make install`

      The command `make certificate` asks for a secure password. Remember this password as it is required for starting secure Apache.

6. Configure Apache for your environment.

   Once you have completed the Apache installation, see “Modifications to Apache Web Server” after plug-in installation.

- Previous: Chapter 17 Java Virtual Machine and Advanced Settings
- Next: Chapter 19 Automatically Restarting a Domain or Node Agent

- © 2010, Oracle Corporation and/or its affiliates