From: Joshua Slive This document covers compilation and installation of Apache
on Unix and Unix-like systems only. For compiling and
- installation on Windows, see Using Apache with Microsoft
- Windows. For other platforms, see the platform documentation.Compiling and Installing
+Apache HTTP Server Version 2.0
Compiling and Installing
Apache 2.0's configuration and installation environment has changed completely from Apache 1.3. Apache 1.3 used a custom @@ -28,43 +15,9 @@ uses libtool and autoconf to create an environment that looks like many other Open Source projects.
-Extract | -$ gzip -d httpd-2_0_NN.tar.gz |
$ pgp < KEYS |
- $ gpg --import KEYS
-
+ or
+ +
$ gpg --import KEYS
The next step is to test the tarball against the PGP
- signature, which should always be obtained from the main Apache
+ signature, which should always be obtained from the main Apache
website. The signature file has a filename identical to the
source tarball with the addition of .asc
. Then you
can check the distribution with one of the following commands
(again, depending on your pgp version):
- $ pgp httpd-2_0_NN.tar.gz.asc
-
- or
++ +
$ pgp httpd-2_0_NN.tar.gz.asc
or
-
- $ gpg --verify httpd-2_0_NN.tar.gz.asc
-
- You should receive a message like+ +
$ gpg --verify httpd-2_0_NN.tar.gz.asc
You should receive a message like
-
- Good signature from user "Martin Kraemer
- <martin@apache.org>".
-
+
Good signature from user "Martin Kraemer + <martin@apache.org>".
Depending on the trust relationships contained in your key
ring, you may also receive a message saying that the
@@ -259,23 +191,21 @@
be verified. This is not a problem if you trust the
authenticity of the KEYS
file.
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
-
+
+ $ 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.
The next step is to configure the Apache source tree for your particular platform and personal requirements. This is @@ -304,12 +234,12 @@ the two additional modules mod_rewrite and mod_speling for later loading through the DSO mechanism:
-
- $ CC="pgcc" CFLAGS="-O2" \
- ./configure --prefix=/sw/pkg/apache \
- --enable-rewrite=shared \
- --enable-speling=shared
-
+
+ $ CC="pgcc" CFLAGS="-O2" \
+ ./configure --prefix=/sw/pkg/apache \
+ --enable-rewrite=shared \
+ --enable-speling=shared +
When configure is run it will take several minutes to test for the availability of features on your system and build @@ -320,8 +250,7 @@ description of most of the arguments and environment variables.
-The autoconf build process uses several environment variables to configure the build environment. In general, these @@ -384,8 +313,8 @@ compiler and linker. -
--help
There are currently two ways to configure the pathnames
under which Apache will install its files. First, you can
@@ -458,16 +388,15 @@
should edit the config.layout
file and use the
--enable-layout
option.
Apache is a modular server. Only the most basic functionality is included in the core server. Extended features are available in various modules. During the configuration process, you must select which modules to compile for use with - your server. You can view a list of modules included in - the documentation. Those modules with a status of "Base" are + your server. You can view a list of modules included in + the documentation. Those modules with a status of "Base" are included by default and must be specifically disabled if you do not want them. Modules with any other status must be specifically enabled if you wish to use them.
@@ -480,7 +409,7 @@ modules may be dynamically compiled. DSO modules are stored separately from the Apache binary, and may be included or excluded from the server using the run-time configuration - directives provided by mod_so. + directives provided bymod_so
.
The mod_so is automatically included in the server if any
dynamic modules are included in the compilation. If you would
like to make your server capable of loading DSOs without
@@ -491,8 +420,7 @@
--enable-MODULE[=shared]
=shared
.
- ./configure --enable-dav --enable-info
-
+
./configure --enable-dav --enable-info
or, equivalently,
-
- ./configure --enable-modules="dav info"
-
+
./configure --enable-modules="dav info"
In addition, the special keywords all
or
most
can be used to add all or most of the modules
@@ -538,10 +462,10 @@
For example, to include all modules as DSOs with the exception
of mod_info, you can use
- ./configure --enable-mods-shared=all
- --disable-info
-
+
+ ./configure --enable-mods-shared=all + --disable-info +
In addition to the standard set of modules, Apache 2.0 also
includes a choice of Multi-Processing
@@ -557,78 +481,59 @@
Apache includes a support program called suexec which can be used to isolate user
+ Apache includes a support program called suexec which can be used to isolate user
CGI programs. However, if suexec is improperly configured, it
can cause serious security problems. Therefore, you should
carefully read and consider the suexec
documentation before implementing this feature. Now you can build the various parts which form the Apache
package by simply running the command: Please be patient here, since a base configuration takes
approximately 3 minutes to compile under a Pentium III/Linux
2.2 system, but this will vary widely depending on your
hardware and the number of modules which you have enabled. Now its time to install the package under the configured
installation PREFIX (see If you are upgrading, the installation will not overwrite
your configuration files or documents. Next, you can customize your Apache HTTP server by editing
the configuration files under
PREFIX/conf/. Have a look at the Apache manual under docs/manual/ or http://httpd.apache.org/docs/
- for a complete reference of available configuration directives. Have a look at the Apache manual under docs/manual/ or http://httpd.apache.org/docs-2.0/
+ for a complete reference of available configuration directives. Now you can start your Apache
HTTP server by immediately running: and then you should be able to request your first document
via URL http://localhost/. The web page you see is located
- under the DocumentRoot
+ under the This document covers compilation and installation of Apache
+ on Unix and Unix-like systems only. For compiling and
+ installation on Windows, see Using Apache with Microsoft
+ Windows. For other platforms, see the platform documentation. Apache 2.0's configuration and installation environment has
+ changed completely from Apache 1.3. Apache 1.3 used a custom
+ set of scripts to achieve easy installation. Apache 2.0 now
+ uses libtool and autoconf to create an environment that looks
+ like many other Open Source projects. NN must be replaced with the current minor version
+ number, and PREFIX must be replaced with the
+ filesystem path under which the server should be installed. If
+ PREFIX is not specified, it defaults to
+ Each section of the compilation and installation process is
+ described in more detail below, beginning with the requirements
+ for compiling and installing Apache HTTPD. The following requirements exist for building Apache: Apache can be downloaded from the Apache Software
+ Foundation download site or from a nearby
+ mirror. Version numbers that end in After downloading, especially if a mirror site is used, 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. This,
+ in turn, is a two step procedure. First, you must obtain the
+ or The next step is to test the tarball against the PGP
+ signature, which should always be obtained from the main Apache
+ website. The signature file has a filename identical to the
+ source tarball with the addition of or You should receive a message like Depending on the trust relationships contained in your key
+ ring, you may also receive a message saying that the
+ relationship between the key and the signer of the key cannot
+ be verified. This is not a problem if you trust the
+ authenticity of the Extracting the source from the Apache HTTPD tarball is a
+ simple matter of uncompressing, and then untarring: This will create a new directory under the current directory
+ containing the source code for the distribution. You should
+ The next step is to configure the Apache source tree for
+ your particular platform and personal requirements. This is
+ done using the script To configure the source tree using all the default options,
+ simply type For a short impression of what possibilities you have, here
+ is a typical example which compiles Apache for the installation
+ tree /sw/pkg/apache with a particular compiler and flags plus
+ the two additional modules mod_rewrite and mod_speling for
+ later loading through the DSO mechanism: When configure is run it will take several minutes to test
+ for the availability of features on your system and build
+ Makefiles which will later be used to compile the server. The easiest way to find all of the configuration flags for
+ Apache is to run ./configure --help. What follows is a brief
+ description of most of the arguments and environment
+ variables. The autoconf build process uses several environment
+ variables to configure the build environment. In general, these
+ variables change the method used to build Apache, but not the
+ eventual features of the server. These variables can be placed
+ in the environment before invoking There are currently two ways to configure the pathnames
+ under which Apache will install its files. First, you can
+ specify a directory and have Apache install itself under that
+ directory in its default locations. It is possible to specify that architecture-dependent files
+ should be placed under a different directory. The second, and more flexible way to configure the install
+ path locations for Apache is using the
+ Presently it is not possible to mix the
+ Apache is a modular server. Only the most basic
+ functionality is included in the core server. Extended features
+ are available in various modules. During the configuration
+ process, you must select which modules to compile for use with
+ your server. You can view a list of modules included in
+ the documentation. Those modules with a status of "Base" are
+ included by default and must be specifically disabled if you do
+ not want them. Modules with any other status must be
+ specifically enabled if you wish to use them. There are two ways for a module to be compiled and used with
+ Apache. Modules may be statically compiled, which
+ means that they are permanently included in the Apache binary.
+ Alternatively, if your operating system supports Dynamic Shared
+ Objects (DSOs) and autoconf can detect that support, then
+ modules may be dynamically compiled. DSO modules are
+ stored separately from the Apache binary, and may be included
+ or excluded from the server using the run-time configuration
+ directives provided by The MODULE-LIST in the
+ or, equivalently, In addition, the special keywords In addition to the standard set of modules, Apache 2.0 also
+ includes a choice of Multi-Processing
+ Modules (MPMs). One, and only one MPM must be included in
+ the compilation process. The default MPMs for each platform are
+ listed on the MPM documentation page,
+ but can be overridden on the Apache includes a support program called suexec which can be used to isolate user
+ CGI programs. However, if suexec is improperly configured, it
+ can cause serious security problems. Therefore, you should
+ carefully read and consider the suexec
+ documentation before implementing this feature. Now you can build the various parts which form the Apache
+ package by simply running the command: Please be patient here, since a base configuration takes
+ approximately 3 minutes to compile under a Pentium III/Linux
+ 2.2 system, but this will vary widely depending on your
+ hardware and the number of modules which you have enabled. Now its time to install the package under the configured
+ installation PREFIX (see If you are upgrading, the installation will not overwrite
+ your configuration files or documents. Next, you can customize your Apache HTTP server by editing
+ the configuration files under
+ PREFIX/conf/. Have a look at the Apache manual under docs/manual/ or http://httpd.apache.org/docs-2.0/
+ for a complete reference of available configuration directives. Now you can start your Apache
+ HTTP server by immediately running: and then you should be able to request your first document
+ via URL http://localhost/. The web page you see is located
+ under the Suexec
- Suexec
+
+ Build
+Build
-
+$ make
- $ make
Install
+Install
--prefix
option
above) by running:
-
+$ make install
- $ make install
Customize
+Customize
-
+$ vi PREFIX/conf/httpd.conf
-
- $ vi PREFIX/conf/httpd.conf
Test
+ Test
-
+$ PREFIX/bin/apachectl start
- $ PREFIX/bin/apachectl start
DocumentRoot
which will usually be PREFIX/htdocs/
.
Then stop the server again by
running:
-
-
-
-
-
+$ PREFIX/bin/apachectl stop
-
+$ PREFIX/bin/apachectl stop
Apache HTTP Server Version 2.0
\ No newline at end of file
diff --git a/docs/manual/install.xml b/docs/manual/install.xml
new file mode 100644
index 0000000000..0726742d4a
--- /dev/null
+++ b/docs/manual/install.xml
@@ -0,0 +1,580 @@
+
+
+
+
+
+
+
+
+
+ Download
+
+
+ $ lynx
+ http://www.apache.org/dist/httpd/httpd-2_0_NN.tar.gz
+
+
+
+ Extract
+
+
+ $ gzip -d httpd-2_0_NN.tar.gz
+ $ tar xvf httpd-2_0_NN.tar
+
+
+ Configure
+
+
+ $ ./configure --prefix=PREFIX
+
+
+
+ Compile
+
+
+ $ make
+
+
+ Install
+
+
+ $ make install
+
+
+ Customize
+
+
+ $ vi PREFIX/conf/httpd.conf
+
+ Test
+
+
+ $ PREFIX/bin/apachectl start
+ /usr/local/apache2
.
+
+
+
+ Make sure you have at least 50 MB of temporary free disk
+ space available. After installation Apache occupies
+ approximately 10 MB of disk space. The actual disk space
+ requirements will vary considerably based on your chosen
+ configuration options and any third-party modules.
+
+
+
+ Make sure you have an ANSI-C compiler installed. The GNU C
+ compiler (GCC) from the Free Software Foundation (FSF)
+ is recommended (version 2.7.2 is fine). If you don't have GCC
+ then at least make sure your vendor's compiler is ANSI
+ compliant. In addition, your PATH
must contain
+ basic build tools such as make
.
+
+
+
+ Elements of the HTTP protocol are expressed as the time of
+ day. So, it's time to investigate setting some time
+ synchronization facility on your system. Usually the ntpdate
+ or xntpd programs are used for this purpose which are based
+ on the Network Time Protocol (NTP). See the Usenet newsgroup
+ comp.protocols.time.ntp
+ and the NTP
+ homepage for more details about NTP software and public
+ time servers.
+
+
+
+ For some of the support scripts like apxs or dbmmanage (which are
+ written in Perl) the Perl 5 interpreter is required (versions
+ 5.003 and 5.004 are fine). If no such interpreter is found by
+ the `configure' script there is no harm. Of course, you still
+ can build and install Apache 2.0. Only those support scripts
+ cannot be used. If you have multiple Perl interpreters
+ installed (perhaps a Perl 4 from the vendor and a Perl 5 from
+ your own), then it is recommended to use the --with-perl
+ option (see below) to make sure the correct one is selected
+ by ./configure.
+
+ alpha
indicate
+ early pre-test versions which may or may not work. Version
+ numbers ending in beta
indicate more reliable
+ releases that still require further testing or bug fixing. If
+ you wish to download the best available production release of
+ the Apache HTTP Server, you should choose the latest version
+ with neither alpha
nor beta
in its
+ filename.KEYS
file from the Apache distribution
+ site. (To assure that the KEYS
file itself has
+ not been modified, it may be a good idea to use a file from a
+ previous distribution of Apache or import the keys from a
+ public key server.) The keys are imported into your personal
+ key ring using one of the following commands (depending on your
+ pgp version):.asc
. Then you
+ can check the distribution with one of the following commands
+ (again, depending on your pgp version):KEYS
file.
+ $ tar xvf httpd-2_0_NN.tar
+cd
into that directory before proceeding with
+ compiling the server.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.)./configure
. To change the default
+ options, configure
accepts a variety of variables
+ and command line options. Environment variables are generally
+ placed before the ./configure
command, while other
+ options are placed after. The most important option here is the
+ location prefix where Apache is to be installed later, because
+ Apache has to be configured for this location to work
+ correctly. But there are a lot of other options available for
+ your pleasure.
+ ./configure --prefix=/sw/pkg/apache \
+ --enable-rewrite=shared \
+ --enable-speling=shared
+configure
, but
+ it is usually easier to specify them on the
+ configure
command line as demonstrated in the
+ example above.
+
+CC=...
CPPFLAGS=...
CFLAGS=...
LDFLAGS=...
LIBS=...
INCLUDES=...
TARGET=...
[Default: apache]NOTEST_CPPFLAGS=...
NOTEST_CFLAGS=...
NOTEST_LDFLAGS=...
NOTEST_LIBS=...
SHLIB_PATH=...
+
+--help
--quiet
--verbose
+
+
+ --prefix=PREFIX
[Default:
+ /usr/local/apache2]
+
+
+ --exec-prefix=EPREFIX
[Default:
+ PREFIX]config.layout
file. Using this method, it is
+ possible to separately specify the location for each type of
+ file within the Apache installation. The
+ config.layout
file contains several example
+ configurations, and you can also create your own custom
+ configuration following the examples. The different layouts in
+ this file are grouped into <Layout
+ FOO>...</Layout>
sections and referred to by
+ name as in FOO
.
+
+
+ --enable-layout=LAYOUT
config.layout
+ file to specify the installation paths.--enable-layout
and --prefix
options.
+ Nor is it possible to individually specify detailed pathnames
+ on the configure
command line. If you want just a
+ basic install, you can simply use the --prefix
+ option on its own. If you want to customize your install, you
+ should edit the config.layout
file and use the
+ --enable-layout
option.--enable-so
.
+
+
+ --enable-MODULE[=shared]
=shared
.--disable-MODULE
--enable-modules=MODULE-LIST
--enable-mods-shared=MODULE-LIST
--enable-modules
and
+ --enable-mods-shared
options is usually a
+ space-separated list of module identifiers. For example, to
+ enable mod_dav and mod_info, you can either useall
or
+ most
can be used to add all or most of the modules
+ in one step. You can then remove any modules that you do not
+ want with the --disable-MODULE
option.
+ For example, to include all modules as DSOs with the exception
+ of mod_info, you can useconfigure
command
+ line.
+
+--with-mpm=NAME
--prefix
option
+ above) by running:PREFIX/htdocs/
.
+ Then stop the server again by
+ running: