2.1. COMPILING AND INSTALLING 11
are used for this purpose which are based on the Network Time Protocol (NTP). See the Usenet newsgroup
comp.protocols.time.ntp
3
and the NTP homepage
4
for more details about NTP software and public time servers.
Perl 5
5
[OPTIONAL] For some of the support scripts like apxs or dbmmanage (which are written in Perl) the Perl 5
interpreter is required (versions 5.003 or newer are sufficient). If you have multiple Perl interpreters (for exam-
ple, a systemwide install of Perl 4, and your own install of Perl 5), you are advised to use the --with-perl
option (see below) to make sure the correct one is used by configure. If no Perl 5 interpreter is found by the
configure script, you will not be able to use the affected support scripts. Of course, you will still be able to build
and use Apache 2.0.
Download
Apache can be downloaded from the Apache HTTP Server download site
6
which lists several mirrors. Most users
of Apache on unix-like systems will be better off downloading and compiling a source version. The build process
(described below) is easy, and it allows you to customize your server to suit your needs. In addition, binary releases
are often not up to date with the latest source releases. If you do download a binary, follow the instructions in the
INSTALL.bindist file inside the distribution.
After downloading, it is important to verify that you have a complete and unmodified version of the Apache HTTP
Server. This can be accomplished by testing the downloaded tarball against the PGP signature. Details on how to do
this are available on the download page
7
and an extended example is available describing the use of PGP
8
.
Extract
Extracting the source from the Apache HTTPD tarball is a simple matter of uncompressing, and then untarring:
$ gzip -d httpd-2 0 NN.tar.gz
$ tar xvf httpd-2 0 NN.tar
This will create a new directory under the current directory containing the source code for the distribution. You should
cd into that directory before proceeding with compiling the server.
Configuring the source tree
The next step is to configure the Apache source tree for your particular platform and personal requirements. This
is done using the script configure included in the root directory of the distribution. (Developers downloading the
CVS version of the Apache source tree will need to have autoconf and libtool installed and will need to run
buildconf before proceeding with the next steps. This is not necessary for official releases.)
To configure the source tree using all the default options, simply type ./configure. To change the default options,
configure accepts a variety of variables and command line options.
The most important option is the location --prefix where Apache is to be installed later, because Apache has to
be configured for this location to work correctly. More fine-tuned control of the location of files is possible with
additional configure options (p. 245) .
Also at this point, you can specify which features (p. 245) you want included in Apache by enabling and disabling
modules (p. 654) . Apache comes with a Base (p. 296) set of modules included by default. Other modules are enabled
3
news:comp.protocols.time.ntp
4
http://www.ntp.org
6
http://httpd.apache.org/download.cgi
7
http://httpd.apache.org/download.cgi#verify
8
http://httpd.apache.org/dev/verification.html