Sun ONE Application Server 7, Enterprise Edition Administrator's Guide |
Appendix C
Compiling and Configuring Apache Web ServerThis section describes how you should compile the Apache source code and configure your installation of Apache Web Server to use the load balancer plug-in.
Minimum RequirementsYou 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.
- openssl-0.9.6g (source)
- mod_ssl-2.8.14-1.3.27 (source)
- apache_1.3.27 (sources)
- gcc-3.3-sol9-sparc-local packages (for Solaris 9).
- flex-2.5.4a-sol9-sparc-local packages (for Solaris 9)
- Sun ONE Application Server 7 Enterprise Edition installables.
- 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.
Installing SSL-aware ApacheFollow these steps to compile, configure, and install SSL-aware Apache web server.
Compiling and Building Open SSL
Unpack the openssl-0.9.6g source and follow these steps.
Configuring Apache with mod SSL
Unpack the mod_ssl-2.8.14-1.3.27 source and follow these steps.
- cd mod_ssl-2.8.14-1.3.27
- run ./configure --with-apache=../apache_1.3.27--with-ssl=../openssl-0.9.6g --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
- Download the apache_1.3.27 source distribution.
Unpack the source distribution. The source distribution comes as a compressed archive. If you are installing apache_1.3.27, the source distribution archive will read apache_1.3.27.tar.gz.
- Decompress and untar the archive using the following command:
tar -zxvf apache_1.3.27.tar.gz
This command will create a directory called apache_1.3.27 in your current working directory.
- Compile Apache using the make command, as follows:
- cd apache_1.3.27
- make
- make certificate
- make install
Note
- This installs apache in the location provided in the --prefix attribute in "Configuring Apache with mod SSL".
- make certificate would ask for a secure password. Remember this password as it’s required for starting secure Apache.
This command 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.
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.