INSTALL revision beaace1271473aa4854f529f2dac9738cd106578
80833bb9a1bf25dcf19e814438a4b311d2e1f4cffuankg APACHE INSTALLATION
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq Introduction
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq ============
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq Apache 2.0's configuration and installation environment has changed
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq completely from Apache 1.3. Apache 1.3 used a custom set of scripts
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq to achieve easy installation. Apache 2.0 now uses libtool and
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq autoconf to create an environment that looks like many other Open
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq Source projects.
4fc0f3118f25efdd3d09b1c53746e92dbcc600f0sf Installing the Apache 2.0 HTTP server
4fc0f3118f25efdd3d09b1c53746e92dbcc600f0sf =====================================
98c1e91bd5f30ced26e436026d163399f340d6f4sf 1. Overview for the impatient
98c1e91bd5f30ced26e436026d163399f340d6f4sf --------------------------
c12917da693bae4028a1d5a5e8224bceed8c739dsf $ ./configure --prefix=PREFIX
eeb7898b9c087040d44550f8a6b1a257783c9f0ahumbedooh $ make install
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsf NOTE: PREFIX is not the string "PREFIX". Instead use the Unix
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsf filesystem path under which Apache should be installed. For
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsf instance use "/usr/local/apache" for PREFIX above.
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsf NOTE: if you are building from a copy of the Apache CVS
d7ffd2da16d58b1a0de212e4d56f7aebb72bef26sf repository, rather than a release distribution, then you
d7ffd2da16d58b1a0de212e4d56f7aebb72bef26sf must use the "buildconf" script before running configure.
4576c1a9ef54cd1e5555ee07d016a7f559f80338sf 2. Requirements
4576c1a9ef54cd1e5555ee07d016a7f559f80338sf ------------
9811aed12bbc71783d2e544ccb5fecd193843eadsf The following requirements exist for building Apache:
d58a822aff1dfda25384d3d009f88f1883c95436kbrand o Disk Space:
d58a822aff1dfda25384d3d009f88f1883c95436kbrand Make sure you have approximately 12 MB of temporary free disk
e02ff627c1e63137247e20493f6ef44b3bb1a095sf space available. After installation Apache occupies
e02ff627c1e63137247e20493f6ef44b3bb1a095sf approximately 5 MB of disk space (the actual required disk
e02ff627c1e63137247e20493f6ef44b3bb1a095sf space depends on the amount of compiled in third party
1366443dc565c33e7b449ae428bbfc4c86f33935drh modules, etc).
88fac54d9d64f85bbdab5d7010816f4377f95bd7rjung o ANSI-C Compiler:
bd3f5647b96d378d9c75c954e3f13582af32c643sf Make sure you have an ANSI-C compiler installed. The GNU C
bd3f5647b96d378d9c75c954e3f13582af32c643sf compiler (GCC) from the Free Software Foundation (FSF) is
bd3f5647b96d378d9c75c954e3f13582af32c643sf recommended (version 2.7.2 is fine). If you don't have GCC
bd3f5647b96d378d9c75c954e3f13582af32c643sf then at least make sure your vendors compiler is ANSI
bd3f5647b96d378d9c75c954e3f13582af32c643sf compliant. You can find the homepage of GNU at
2a7beea91d46beb41f043a84eaad060047ee04aafabien http://www.gnu.org/ and the GCC distribution under
2a7beea91d46beb41f043a84eaad060047ee04aafabien o Perl 5 Interpreter [OPTIONAL]:
9e430d18dde58791589bd699416c8319560dd067jim For some of the support scripts like `apxs' or `dbmmanage'
9e430d18dde58791589bd699416c8319560dd067jim (which are written in Perl) the Perl 5 interpreter is required
584a85dd4047e38d3ed3a29b6662fcc9d100ae4csf (versions 5.003 and 5.004 are fine). If no such interpreter is
584a85dd4047e38d3ed3a29b6662fcc9d100ae4csf found by the `configure' script this is no harm. Of
584a85dd4047e38d3ed3a29b6662fcc9d100ae4csf course, you still can build and install Apache 2.0. Only those
f21e9e3d0bfb7a507ecc5bc963f2159d693503d1sf support scripts cannot be used. If you have multiple Perl
f21e9e3d0bfb7a507ecc5bc963f2159d693503d1sf interpreters installed (perhaps a Perl 4 from the vendor and a
f21e9e3d0bfb7a507ecc5bc963f2159d693503d1sf Perl 5 from your own), then it is recommended to use the
f6b9c755a0b793e8a3a3aebd327ca20a86478117sf --with-perl option (see below) to make sure the correct one is
f6b9c755a0b793e8a3a3aebd327ca20a86478117sf selected by ./configure.
132ee6ac1c26d6e8953836316ba50734eefab47bsf o Dynamic Shared Object (DSO) support [OPTIONAL]:
132ee6ac1c26d6e8953836316ba50734eefab47bsf To provide maximum flexibility Apache now is able to load
fc1459657a1fde206a847f9028930725d715f8b4trawick modules under runtime via the DSO mechanism by using the
fc1459657a1fde206a847f9028930725d715f8b4trawick pragmatic dlopen()/dlsym() system calls. These system calls
fc1459657a1fde206a847f9028930725d715f8b4trawick are not available under all operating systems therefore you
85eacfc96a04547ef25aabbc06440039715084c2jorton cannot use the DSO mechanism on all platforms. And Apache
85eacfc96a04547ef25aabbc06440039715084c2jorton currently has only limited built-in knowledge on how to
85eacfc96a04547ef25aabbc06440039715084c2jorton compile shared objects because this is heavily
68ba377fc3b124baa759662077c48077ebadb186minfrin platform-dependent. The current state is this:
68ba377fc3b124baa759662077c48077ebadb186minfrin o Out-of-the-box supported platforms are (Not all of these
68ba377fc3b124baa759662077c48077ebadb186minfrin will work currently. DSO support is currently available on
d776b0a2d2889ce1d13494873368f34327a2e1bbtrawick most of these platforms however):
d776b0a2d2889ce1d13494873368f34327a2e1bbtrawick - Linux - SunOS - UnixWare - Darwin/Mac OS
f4ca9f6f002fece336168a16355434ca966f96a9trawick - FreeBSD - Solaris - AIX - OpenStep/Mach
78f94f1d06c4e6828ce04d618221e0fcecb57849humbedooh - OpenBSD - IRIX - SCO - DYNIX/ptx
78f94f1d06c4e6828ce04d618221e0fcecb57849humbedooh - NetBSD - HPUX - ReliantUNIX
78f94f1d06c4e6828ce04d618221e0fcecb57849humbedooh - BSDI - Digital Unix - DGUX
536d2e7cd1fdec1255b8c3bdf41fdc714c506a54trawick o Entirely unsupported platforms are:
70caa242e6b90e0d6f0fabb56b8c5c2fb51717b3jorton If your system is not on these lists but has the dlopen-style
985a4368b93c3e9171a57897ad9454c8dbf4cdf6jorton interface, you either have to provide the appropriate compiler
70caa242e6b90e0d6f0fabb56b8c5c2fb51717b3jorton and linker flags (see CFLAGS_SHLIB, LDFLAGS_SHLIB and
70caa242e6b90e0d6f0fabb56b8c5c2fb51717b3jorton LDFLAGS_SHLIB_EXPORT below) manually or at least make sure a
109e2a09790de3fb315d36d6232a14ab66c8eb0ahumbedooh Perl 5 interpreter is installed from which Apache can guess
109e2a09790de3fb315d36d6232a14ab66c8eb0ahumbedooh the options.
74e7a30182af5e68f14ccb8d57918b22b982db8bhumbedooh If you are building from a copy of the CVS repository, rather
74e7a30182af5e68f14ccb8d57918b22b982db8bhumbedooh than a release distribution, then you will need these additional
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh o Libtool 1.3.3:
0448378b899e8df0c060360f17c0af692adf17bchumbedooh Make sure that you have libtool 1.3.3 or later installed
0448378b899e8df0c060360f17c0af692adf17bchumbedooh before trying to configure and build Apache 2.0. Libtool can
60a765cccbd3f3b5997b65b0034220c79f78369etrawick be downloaded from the Free Software Foundation (FSF), at
e7ca863b04ee2a7aea7738cadbf51ce5e6c5245dhumbedooh o Autoconf 2.13:
e7ca863b04ee2a7aea7738cadbf51ce5e6c5245dhumbedooh Make sure that you have autoconf 2.13 or later installed
e7ca863b04ee2a7aea7738cadbf51ce5e6c5245dhumbedooh before trying to configure and build Apache 2.0. Autoconf can
91654e263480f0fdc2a03d782ff23f8dad07cf79humbedooh be downloaded from the Free Software Foundation (FSF), at
79c5787b92ac5f0e1cc82393816c77a006399316trawick 3. Configuring the source tree
79c5787b92ac5f0e1cc82393816c77a006399316trawick ---------------------------
79c5787b92ac5f0e1cc82393816c77a006399316trawick If you have downloading the Apache 2.0 from the CVS, rather than
79c5787b92ac5f0e1cc82393816c77a006399316trawick a release distribution, then you will need to prepare the source
79c5787b92ac5f0e1cc82393816c77a006399316trawick tree for configuration and compilation. This is done by running:
12b987b969f03ef98d9175a53d849ab62f5684fecovener ./buildconf
7b395e4e878c28a4784919cfd2e704ddd14a3390jorton This script ensures that all required programs are installed on
7b395e4e878c28a4784919cfd2e704ddd14a3390jorton the currently machine, and creates the ./configure script. If
7b395e4e878c28a4784919cfd2e704ddd14a3390jorton you are using a package downloaded from apache.org then this step
7b395e4e878c28a4784919cfd2e704ddd14a3390jorton is not necessary.
536e48c08d674acac5d44929318f2ad928edc361jorton Introduction:
e81785da447b469da66f218b3f0244aab507958djorton The next step is to configure the Apache source tree for your
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jorton particular platform and personal requirements. The most important
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jorton setup here is the location prefix where Apache is to be installed
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jorton later, because Apache has to be configured for this location to
53e9b27aba029b18be814df40bcf6f0428771d1efuankg work correctly. But there are a lot of other options available
53e9b27aba029b18be814df40bcf6f0428771d1efuankg for your pleasure.
53e9b27aba029b18be814df40bcf6f0428771d1efuankg For a short impression of what possibilities you have, here is a
53e9b27aba029b18be814df40bcf6f0428771d1efuankg typical example which compiles Apache for the installation tree
6bb524f1895f30265a1431afc460977d391cb36bsf /sw/pkg/apache with a particular compiler and flags plus the two
6bb524f1895f30265a1431afc460977d391cb36bsf additional modules mod_rewrite and mod_speling for later loading
ca61ccd0c306c2c72df153688ba1b49f3eceed80sf through the DSO mechanism:
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin $ CC="pgcc" OPTIM="-O2" \
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin ./configure --prefix=/sw/pkg/apache \
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin --enable-rewrite=shared \
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin --enable-speling=shared
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin The easiest way to find all of the configuration flags for Apache
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin 2.0 is to run ./configure --help. What follows is a brief
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin description of most of the arguments.
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung $ [CC=...] [CFLAGS_SHLIB=...] [TARGET=...]
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung [OPTIM=...] [LD_SHLIB=...]
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung [CFLAGS=...] [LDFLAGS_SHLIB=...]
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung [INCLUDES=...] [LDFLAGS_SHLIB_EXPORT=...]
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung [LDFLAGS=...] [RANLIB=...]
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick [LIBS=...] [DEPS=...]
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick [NOTEST_CFLAGS=...]
0827cb14e550f6f65018431c22c2c913631c8f25kbrand [NOTEST_LDFLAGS=...]
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick ./configure
ae600ca541efc686b34f8b1f21bd3d0741d37674covener [--quiet] [--prefix=DIR] [--enable-NAME=(shared)]
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick [--verbose] [--exec-prefix=PREFIX] [--disable-NAME]
cfa64348224b66dd1c9979b809406c4d15b1c137fielding [--shadow[=DIR]] [--bindir=EPREFIX] [--with-mpm=NAME]
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajim [--show-layout] [--sbindir=DIR]
cfa64348224b66dd1c9979b809406c4d15b1c137fielding [--help] [--libexecdir=DIR]
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajim [--mandir=DIR]
cfa64348224b66dd1c9979b809406c4d15b1c137fielding [--sysconfdir=DIR]
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajim [--datadir=DIR]
cfa64348224b66dd1c9979b809406c4d15b1c137fielding [--includedir=DIR]
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajim [--localstatedir=DIR]
cfa64348224b66dd1c9979b809406c4d15b1c137fielding [--runtimedir=DIR] [--enable-suexec]
default is PREFIX=/usr/local/apache and EPREFIX=PREFIX.
includedir=PREFIX/include, localstatedir=PREFIX,
proxycachedir=PREFIX/proxy.
locations (like /usr/local/ or /etc) with Apache files
file config.layout: `Apache' for the classical Apache path layout
config.layout and use --with-layout=FOO or place it into your own
file, say config.mypaths, and use
--with-layout=config.mypaths:FOO.
(+) mod_env .......... Set environment variables for CGI/SSI scripts
(+) mod_mime ......... Content type/encoding determination (configured)
(-) mod_mime_magic ... Content type/encoding determination (automatic)
YOU TO FIRST READ THE DOCUMENT htdocs/manual/suexec.html
complete under a Pentium-166/FreeBSD-2.2 system, dependend on the
installs under prefix _only_, i.e. no other stuff from your
your configuration files in PREFIX/conf/ are preserved.
$ PREFIX/bin/apachectl start
URL http://localhost/ (when you built and installed Apache as
http://localhost:8080/ (when you built and installed Apache as a
$ PREFIX/bin/apachectl stop
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
1. A correctly working TCP/IP layer, since HTTP is implemented on
top of TCP/IP. Although modern Unix platforms have good
(NTP). See the Usenet newsgroup comp.protocols.time.ntp and
the NTP homepage at http://www.eecis.udel.edu/~ntp/ for more
described under http://httpd.apache.org/announcelist.html
following USENET newsgroup: comp.infosystems.www.servers.unix