install.html revision 21ee8872f078d5a8dc90d67152b24a355a45cc07
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<HTML>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<HEAD>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<TITLE>Compiling and Installing Apache</TITLE>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</HEAD>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<BODY
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China BGCOLOR="#FFFFFF"
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China TEXT="#000000"
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China LINK="#0000FF"
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China VLINK="#000080"
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China ALINK="#FF0000"
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<!--#include virtual="header.html" -->
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<H1 ALIGN="CENTER">Compiling and Installing</H1>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>This document covers compilation and installation of Apache on Unix
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaand Unix-like systems only. For compiling and installation on Windows,
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinasee <A HREF="platform/windows.html">Using Apache with Microsoft
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaWindows</A>. For other platforms, see the <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="platform/">platform</a> documentation.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Apache 2.0's configuration and installation environment has changed
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinacompletely from Apache 1.3. Apache 1.3 used a custom set of scripts
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinato achieve easy installation. Apache 2.0 now uses libtool and
3ae945c326c1fc078149f2c8b11fac0cc8f6d1d6lin wang - Sun Microsystems - Beijing Chinaautoconf to create an environment that looks like many other Open
3ae945c326c1fc078149f2c8b11fac0cc8f6d1d6lin wang - Sun Microsystems - Beijing ChinaSource projects.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h3>Overview for the impatient</h3>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<table>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<tr><td><a href="#download">Download</a></td>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<td><code>$ lynx http://www.apache.org/dist/httpd/httpd-2_0_<em>NN</em>.tar.gz
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></td></tr>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<tr><td><a href="#extract">Extract</a></td>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<td><code>$ gzip -d httpd-2_0_<em>NN</em>.tar.gz<br>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China$ tar xvf httpd-2_0_<em>NN</em>.tar
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></td></tr>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<tr><td><a href="#configure">Configure</a></td>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<td><code>$ /configure --prefix=<em>PREFIX</em>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></td></tr>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<tr><td><a href="#compile">Compile</a></td>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<td><code>$ make
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></td></tr>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<tr><td><a href="#install">Install</a></td>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<td><code>$ make install
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></td></tr>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<tr><td><a href="#customize">Customize</a></td>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<td><code>$ vi <em>PREFIX</em>/conf/httpd.conf
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></td></tr>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<tr><td><a href="#test">Test</a></td>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<td><code>$ <em>PREFIX</em>/bin/apachectl start
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></td></tr>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</table>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p><em>NN</em> must be replaced with the current minor version number,
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaand <em>PREFIX</em> must be replaced with the filesystem path under
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinawhich the server should be installed. If <em>PREFIX</em> is not
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaspecified, it defaults to <code>/usr/local/apache2</code>.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Each section of the compilation and installation process is
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinadescribed in more detail below, beginning with the requirements
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinafor compiling and installing Apache HTTPD.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h3>Requirements</h3>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>The following requirements exist for building Apache:</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<ul>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<li>Disk Space<br><br> Make sure you have at least 50 MB of temporary
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinafree disk space available. After installation Apache occupies
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaapproximately 10 MB of disk space. The actual disk space requirements
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinawill vary considerably based on your chosen configuration options and
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaany third-party modules.<br><br></li>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<li>ANSI-C Compiler and Build System<br><br> Make sure you have an
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaANSI-C compiler installed. The <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="http://www.gnu.org/software/gcc/gcc.html">GNU C compiler
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China(GCC)</a> from the <a href="http://www.gnu.org/">Free Software
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaFoundation (FSF)</a> is recommended (version 2.7.2 is fine). If you
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinadon't have GCC then at least make sure your vendors compiler is ANSI
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinacompliant. In addition, your <code>PATH</code> must contain basic
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinabuild tools such as <code>make</code>.<br><br></li>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<li>Accurate time keeping<br><br> Elements of the HTTP protocol are
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaexpressed as the time of day. So, it's time to investigate setting
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinasome time synchronization facility on your system. Usually the ntpdate
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaor xntpd programs are used for this purpose which are based on the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaNetwork Time Protocol (NTP). See the Usenet newsgroup <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="news:comp.protocols.time.ntp">comp.protocols.time.ntp</a> and
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinathe <a href="http://www.eecis.udel.edu/~ntp/">NTP homepage</a> for more
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinadetails about NTP software and public time servers.<br><br></li>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<li><a href="http://www.perl.org/">Perl 5</a> [OPTIONAL]<br><br> For
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinasome of the support scripts like <a href="programs/apxs.html">apxs</a>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaor <a href="programs/dbmmanage.html">dbmmanage</a> (which are written
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinain Perl) the Perl 5 interpreter is required (versions 5.003 and 5.004
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaare fine). If no such interpreter is found by the `configure' script
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinathere is no harm. Of course, you still can build and install Apache
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China2.0. Only those support scripts cannot be used. If you have multiple
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaPerl interpreters installed (perhaps a Perl 4 from the vendor and a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaPerl 5 from your own), then it is recommended to use the --with-perl
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaoption (see below) to make sure the correct one is selected by
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China/configure. <br><br></li>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</ul>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h3><a name="download">Download</a></h3>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Apache can be downloaded from the <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="http://www.apache.org/dist/httpd/">Apache Software Foundation
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinadownload site</a> or from a <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="http://www.apache.org/dyn/closer.cgi">nearby mirror</a>.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Version numbers that end in <code>alpha</code> indicate early
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinapre-test versions which may or may not work. Version numbers ending
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinain <code>beta</code> indicate more reliable releases that still
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinarequire further testing or bug fixing. If you wish to dowload the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinabest available production release of the Apache HTTP Server, you
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinashould choose the latest version with neither <code>alpha</code> nor
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<code>beta</code> in its filename.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>After downloading, especially if a mirror site is used, it is
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaimportant to verify that you have a complete and unmodified version
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaof the Apache HTTP Server. This can be accomplished by testing the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinadownloaded tarball against the PGP signature, which should always be
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaobtained from the <a href="http://www.apache.org/dist/httpd">main
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaApache website</a>. The signature file has a filename identical to
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinathe source tarball with the addition of <code>.asc</code>.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h3><a name="extract">Extract</a></h3>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Extracting the source from the Apache HTTPD tarball is a simple
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinamatter of uncompressing, and then untarring:</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<blockquote><code>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China$ gzip -d httpd-2_0_<em>NN</em>.tar.gz<br>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China$ tar xvf httpd-2_0_<em>NN</em>.tar
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></blockquote>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>This will create a new directory under the current directory
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinacontaining the source code for the distribution. You should
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<code>cd</code> into that directory before proceeding with
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinacompiling the server.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h3><a name="configure">Configuring the source tree</a></h3>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>The next step is to configure the Apache source tree for your
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaparticular platform and personal requirements. This is done using the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinascript <code>configure</code> included in the root directory of the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinadistribution. (Developers downloading the CVS version of the Apache
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinasource tree will need to have <code>autoconf</code> and
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<code>libtool</code> installed and will need to run
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<code>buildconf</code> before proceeding with the next steps. This is
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinanot necessary for official releases.)</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>To configure the source tree using all the default options, simply
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinatype <code>/configure</code>. To change the default options,
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<code>configure</code> accepts a variety of variables and command line
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaoptions. Environment variables are generally placed before the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<code>/configure</code> command, while other options are placed
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaafter. The most important option here is the location prefix where
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaApache is to be installed later, because Apache has to be configured
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinafor this location to work correctly. But there are a lot of other
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaoptions available for your pleasure.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>For a short impression of what possibilities you have, here is a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinatypical example which compiles Apache for the installation tree
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China/sw/pkg/apache with a particular compiler and flags plus the two
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaadditional modules mod_rewrite and mod_speling for later loading
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinathrough the DSO mechanism:</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<blockquote><code>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China $ CC="pgcc" CFLAGS="-O2" \<br>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China /configure --prefix=/sw/pkg/apache \<br>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China --enable-rewrite=shared \<br>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China --enable-speling=shared
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></blockquote>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>When configure is run it will take several minutes to test for
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinathe availability of features on your system and build Makefiles
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinawhich will later be used to compile the server.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>The easiest way to find all of the configuration flags for Apache
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinais to run /configure --help. What follows is a brief description
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaof most of the arguments and environment variables.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h4>Environment Variables</h4>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>The autoconf build process uses several environment variables to
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaconfigure the build environment. In general, these variables change
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinathe method used to build Apache, but not the eventual features of the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaserver. These variables can be placed in the environment before
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinainvoking <code>configure</code>, but it is usually easier to specify
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinathem on the <code>configure</code> command line as demonstrated
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinain the example above.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>CC=...</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>The name of the C compiler command.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>CPPFLAGS=...</code></dt> <dd>Miscellaneous C preprocessor
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaand compiler options.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>CFLAGS=...</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Debugging and optimization options for the C compiler.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>LDFLAGS=...</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Miscellaneous options to be passed to the linker.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>LIBS=...</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Library location information ("-L" and "-l" options)
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinato pass to the linker.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>INCLUDES=...</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Header file search directories ("-I<em>dir</em>").</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>TARGET=...</code> [Default: apache]</dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Name of the executable which will be built.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>NOTEST_CPPFLAGS=...</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>NOTEST_CFLAGS=...</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>NOTEST_LDFLAGS=...</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>NOTEST_LIBS=...</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>These variables share the same function as their non-NOTEST namesakes.
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaHowever, the variables are applied to the build process only after
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaautoconf has performed its feature testing. This allows the inclusion of
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaflags which will cause problems during feature testing, but must be used
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinafor the final compilation.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>SHLIB_PATH=...</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Options which specify shared library paths for the compiler and
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinalinker.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h4>autoconf Output Options</h4>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>--help</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Prints the usage message including all available options, but
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinadoes not actually configure anything.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>--quiet</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Prevents the printing of the usual "checking..." messages.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>--verbose</code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Prints much more information during the configuration process,
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaincluding the names of all the files examined.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h4>Pathnames</h4>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>There are currently two ways to configure the pathnames under
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinawhich Apache will install its files. First, you can specify
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaa directory and have Apache install itself under that directory
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinain its default locations.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>--prefix=<em>PREFIX</em></code> [Default:
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China/usr/local/apache2]</dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Specifies the directory under which the Apache files will be
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinainstalled.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>It is possible to specify that architecture-dependent files should
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinabe placed under a different directory.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>--exec-prefix=<em>EPREFIX</em></code> [Default:
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<em>PREFIX</em>]</dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Specifies the directory under which architecture-dependent files
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinawill be placed.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>The second, and more flexible way to configure the install path
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinalocations for Apache is using the <code>config.layout</code> file.
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaUsing this method, it is possible to separately specify the location
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinafor each type of file within the Apache installation. The
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<code>config.layout</code> file contains several example
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaconfigurations, and you can also create your own custom configuration
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinafollowing the examples. The different layouts in this file are
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinagrouped into <code>&lt;Layout FOO&gt;...&lt;/Layout&gt;</code>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinasections and referred to by name as in <code>FOO</code>.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>--enable-layout=<em>LAYOUT</em></code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Use the named layout in the <code>config.layout</code> file
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinato specify the installation paths.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Presently it is not possible to mix the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<code>--enable-layout</code> and <code>--prefix</code> options. Nor
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinais it possible to individually specify detailed pathnames on the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<code>configure</code> command line. If you want just a basic
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinainstall, you can simply use the <code>--prefix</code> option on its
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaown. If you want to customize your install, you should edit the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<code>config.layout</code> file and use the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<code>--enable-layout</code> option.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h4>Modules</h4>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Apache is a modular server. Only the most basic functionality is
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaincluded in the core server. Extended features are available in
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinavarious modules. During the configuration process, you must select
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinawhich modules to compile for use with your server. You can view a <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="mod/index-bytype.html">list of modules</a> included in the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinadocumentation. Those modules with a <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="mod/module-dict.html#Status">status</a>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaof "Base" are included by default and must be specifically disabled if
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinayou do not want them. Modules with any other status must be
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaspecifically enabled if you wish to use them.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>There are two ways for a module to be compiled and used with
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaApache. Modules may be <em>statically compiled</em>, which means that
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinathey are permanently included in the Apache binary. Alternatively, if
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinayour operating system supports Dynamic Shared Objects (DSOs) and
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaautoconf can detect that support, then modules may be <em>dynamically
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinacompiled</em>. DSO modules are stored separately from the Apache
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinabinary, and may be included or excluded from the server using the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinarun-time configuration directives provided by <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="mod/mod_so.html">mod_so</a>. The mod_so is automatically
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaincluded in the server if any dynamic modules are included in the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinacompilation. If you would like to make your server capable of loading
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaDSOs without actually compiling any dynamic modules, you can
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaexplicitly <code>--enable-so</code>.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>--enable-<em>MODULE</em>[=shared]</code></dt> <dd>Compile
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaand include the module <em>MODULE</em>. The identifier
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<em>MODULE</em> is the <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="mod/module-dict.html#ModuleIdentifier"
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China>Module Identifier</a> from the module documentation without the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China"_module" string. To compile the module dynamically as a DSO, add the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaoption <code>=shared</code>.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>--disable-<em>MODULE</em></code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Remove the module <em>MODULE</em> which would otherwise be
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinacompiled and included.</dd>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>In addition to the standard set of modules, Apache 2.0 also
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaincludes a choice of <a href="mpm.html">Multi-Processing Modules</a>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China(MPMs). One, and only one MPM must be included in the compilation
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaprocess. The default MPMs for each platform are listed on the <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="mpm.html">MPM documentation page</a>, but can be overridden
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaon the <code>configure</code> command line.
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dt><code>--with-mpm=<em>NAME</em></code></dt>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<dd>Choose the mpm <em>NAME</em>.
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</dl>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h4>Suexec</h4>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Apache includes a support program called <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="suexec.html">suexec</a> which can be used to isolate user CGI
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaprograms. However, if suexec is improperly configured, it can cause
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaserious security problems. Therefore, you should carefully read and
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaconsider the <a href="suexec.html">suexec documentation</a> before
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaimplementing this feature.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h3><a name="compile">Building the package</a></h3>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Now you can build the various parts which form the Apache package
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaby simply running the command:</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<blockquote><code>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China $ make
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></blockquote>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Please be patient here, since a base configuration takes
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaapproximately 3 minutes to compile under a Pentium III/Linux 2.2
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinasystem, but this will vary widely depending on your hardware and the
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinanumber of modules which you have enabled.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h3><a name="install">Installing the package</a></h3>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Now its time to install the package under the configured
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinainstallation PREFIX (see <code>--prefix</code> option above) by running:</h3>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<blockquote><code>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China $ make install
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></blockquote>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>If you are upgrading, the installation will not overwrite
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinayour configuration files or documents.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h3><a name="customize">Customizing the package</a></h3>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Next, you can customize your Apache HTTP server by editing the <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="configuring.html">configuration files</a> under
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing ChinaPREFIX/conf/.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<blockquote><code>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China$ vi PREFIX/conf/httpd.conf
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></blockquote>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Have a look at the Apache manual under <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="./">docs/manual/</a> or <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="http://httpd.apache.org/docs/">http://httpd.apache.org/docs/</a>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinafor a complete reference of available <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="mod/directives.html">configuration directives</a>.</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<h3><a name="test">Testing the package</a></h3>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>Now you can <a href="invoking.html">start</a> your Apache HTTP
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaserver by immediately running:</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<blockquote><code>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China $ PREFIX/bin/apachectl start
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</code></blockquote>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<p>and then you should be able to request your first document via URL
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahttp://localhost/ (when you built and installed Apache as root) or
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahttp://localhost:8080/ (when you built and installed Apache as a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinaregular user). The web page you see is located under the <a
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinahref="mod/core.html#documentroot">DocumentRoot</a> which will usually
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinabe <code>PREFIX/htdocs/</code>. Then <a href="stopping.html">stop</a>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing Chinathe server again by running:</p>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<blockquote><code> $ PREFIX/bin/apachectl stop </code></blockquote>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China<!--#include virtual="footer.html" -->
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</BODY>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China</HTML>
dd1de3740722a4b99a74005255effebbd20a6d70lin wang - Sun Microsystems - Beijing China