home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 May / PCWorld_2004-05_cd.bin / komunikace / apache / apache_2.0.48-win32-x86-no_ssl.msi / Data.Cab / F252114_install.html.en < prev    next >
Extensible Markup Language  |  2003-09-01  |  31KB  |  663 lines

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
  4.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  5.               This file is generated from xml source: DO NOT EDIT
  6.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  7.       -->
  8. <title>Compiling and Installing - Apache HTTP Server</title>
  9. <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
  10. <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
  11. <link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
  12. <link href="./images/favicon.ico" rel="shortcut icon" /></head>
  13. <body id="manual-page"><div id="page-header">
  14. <p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p>
  15. <p class="apache">Apache HTTP Server Version 2.0</p>
  16. <img alt="" src="./images/feather.gif" /></div>
  17. <div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div>
  18. <div id="path">
  19. <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs-project/">Documentation</a> > <a href="./">Version 2.0</a></div><div id="page-content"><div id="preamble"><h1>Compiling and Installing</h1>
  20. <div class="toplang">
  21. <p><span>Available Languages: </span><a href="./de/install.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
  22. <a href="./en/install.html" title="English"> en </a> |
  23. <a href="./ja/install.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
  24. <a href="./ko/install.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
  25. <a href="./ru/install.html" hreflang="ru" rel="alternate" title="Russian"> ru </a></p>
  26. </div>
  27.  
  28.  
  29.     <p>This document covers compilation and installation of Apache
  30.     on Unix and Unix-like systems only. For compiling and
  31.     installation on Windows, see <a href="platform/windows.html">Using Apache with Microsoft
  32.     Windows</a>. For other platforms, see the <a href="platform/">platform</a> documentation.</p>
  33.  
  34.     <p>Apache 2.0's configuration and installation environment has
  35.     changed completely from Apache 1.3. Apache 1.3 used a custom
  36.     set of scripts to achieve easy installation. Apache 2.0 now
  37.     uses <code>libtool</code> and <code>autoconf</code>
  38.     to create an environment that looks like many other Open Source
  39.     projects.</p>
  40.  
  41.     <p>If you are upgrading from one minor version to the next (for
  42.     example, 2.0.50 to 2.0.51), please skip down to the <a href="#upgrading">upgrading</a> section.</p>
  43.  
  44. </div>
  45. <div id="quickview"><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#overview">Overview for the
  46.     impatient</a></li>
  47. <li><img alt="" src="./images/down.gif" /> <a href="#requirements">Requirements</a></li>
  48. <li><img alt="" src="./images/down.gif" /> <a href="#download">Download</a></li>
  49. <li><img alt="" src="./images/down.gif" /> <a href="#extract">Extract</a></li>
  50. <li><img alt="" src="./images/down.gif" /> <a href="#configure">Configuring the source tree</a></li>
  51. <li><img alt="" src="./images/down.gif" /> <a href="#compile">Build</a></li>
  52. <li><img alt="" src="./images/down.gif" /> <a href="#install">Install</a></li>
  53. <li><img alt="" src="./images/down.gif" /> <a href="#customize">Customize</a></li>
  54. <li><img alt="" src="./images/down.gif" /> <a href="#test">Test</a></li>
  55. <li><img alt="" src="./images/down.gif" /> <a href="#upgrading">Upgrading</a></li>
  56. </ul><h3>See also</h3><ul class="seealso"><li><a href="invoking.html">Starting Apache</a></li><li><a href="stopping.html">Stopping and Restarting</a></li></ul></div>
  57. <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  58. <div class="section">
  59. <h2><a name="overview" id="overview">Overview for the
  60.     impatient</a></h2>
  61.  
  62.     <table>
  63.       
  64.       <tr>
  65.         <td><a href="#download">Download</a></td>
  66.  
  67.         <td><code>$ lynx http://httpd.apache.org/download.cgi</code>
  68.         </td>
  69.       </tr>
  70.  
  71.       <tr>
  72.         <td><a href="#extract">Extract</a></td>
  73.  
  74.         <td><code>$ gzip -d httpd-2_0_<em>NN</em>.tar.gz<br />
  75.          $ tar xvf httpd-2_0_<em>NN</em>.tar</code> </td>
  76.       </tr>
  77.  
  78.       <tr>
  79.         <td><a href="#configure">Configure</a></td>
  80.  
  81.         <td><code>$ ./configure --prefix=<em>PREFIX</em></code>
  82.         </td>
  83.       </tr>
  84.  
  85.       <tr>
  86.         <td><a href="#compile">Compile</a></td>
  87.  
  88.         <td><code>$ make</code> </td>
  89.       </tr>
  90.  
  91.       <tr>
  92.         <td><a href="#install">Install</a></td>
  93.  
  94.         <td><code>$ make install</code> </td>
  95.       </tr>
  96.  
  97.       <tr>
  98.         <td><a href="#customize">Customize</a></td>
  99.  
  100.         <td><code>$ vi <em>PREFIX</em>/conf/httpd.conf</code> </td>
  101.       </tr>
  102.  
  103.       <tr>
  104.         <td><a href="#test">Test</a></td>
  105.  
  106.         <td><code>$ <em>PREFIX</em>/bin/apachectl start</code>
  107.         </td>
  108.       </tr>
  109.     </table>
  110.  
  111.     <p><em>NN</em> must be replaced with the current minor version
  112.     number, and <em>PREFIX</em> must be replaced with the
  113.     filesystem path under which the server should be installed. If
  114.     <em>PREFIX</em> is not specified, it defaults to
  115.     <code>/usr/local/apache2</code>.</p>
  116.  
  117.     <p>Each section of the compilation and installation process is
  118.     described in more detail below, beginning with the requirements
  119.     for compiling and installing Apache HTTPD.</p>
  120. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  121. <div class="section">
  122. <h2><a name="requirements" id="requirements">Requirements</a></h2>
  123.  
  124.     <p>The following requirements exist for building Apache:</p>
  125.  
  126.     <dl>
  127.       <dt>Disk Space</dt>
  128.       <dd>Make sure you have at least 50 MB of temporary free disk
  129.       space available. After installation Apache occupies
  130.       approximately 10 MB of disk space. The actual disk space
  131.       requirements will vary considerably based on your chosen
  132.       configuration options and any third-party modules.</dd>
  133.  
  134.       <dt>ANSI-C Compiler and Build System</dt>
  135.       <dd>Make sure you have an ANSI-C compiler installed. The <a href="http://www.gnu.org/software/gcc/gcc.html">GNU C
  136.       compiler (GCC)</a> from the <a href="http://www.gnu.org/">Free Software Foundation (FSF)</a>
  137.       is recommended (version 2.7.2 is fine). If you don't have GCC
  138.       then at least make sure your vendor's compiler is ANSI
  139.       compliant. In addition, your <code>PATH</code> must contain
  140.       basic build tools such as <code>make</code>.</dd>
  141.  
  142.       <dt>Accurate time keeping</dt>
  143.       <dd>Elements of the HTTP protocol are expressed as the time of
  144.       day. So, it's time to investigate setting some time
  145.       synchronization facility on your system. Usually the
  146.       <code>ntpdate</code> or <code>xntpd</code> programs are used for
  147.       this purpose which are based on the Network Time Protocol (NTP).
  148.       See the Usenet newsgroup <a href="news:comp.protocols.time.ntp">comp.protocols.time.ntp</a>
  149.       and the <a href="http://www.eecis.udel.edu/~ntp/">NTP
  150.       homepage</a> for more details about NTP software and public
  151.       time servers.</dd>
  152.  
  153.       <dt><a href="http://www.perl.org/">Perl 5</a>
  154.       [OPTIONAL]</dt>
  155.       <dd>For some of the support scripts like <a href="programs/apxs.html">apxs</a> or <a href="programs/dbmmanage.html">dbmmanage</a> (which are
  156.       written in Perl) the Perl 5 interpreter is required (versions
  157.       5.003 or newer are sufficient). If no such interpreter is found by
  158.       the `<code>configure</code>' script there is no harm. Of course, you
  159.       still can build and install Apache 2.0. Only those support scripts
  160.       cannot be used. If you have multiple Perl interpreters
  161.       installed (perhaps a Perl 4 from the vendor and a Perl 5 from
  162.       your own), then it is recommended to use the <code>--with-perl</code>
  163.       option (see below) to make sure the correct one is selected
  164.       by <code>./configure</code>.</dd>
  165.     </dl>
  166. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  167. <div class="section">
  168. <h2><a name="download" id="download">Download</a></h2>
  169.  
  170.     <p>Apache can be downloaded from the <a href="http://httpd.apache.org/download.cgi">Apache HTTP Server
  171.     download site</a> which lists several mirrors. You'll find here
  172.     the latest stable release.</p>
  173.  
  174.     <p>After downloading, especially if a mirror site is used, it
  175.     is important to verify that you have a complete and unmodified
  176.     version of the Apache HTTP Server. This can be accomplished by
  177.     testing the downloaded tarball against the PGP signature. This,
  178.     in turn, is a two step procedure. First, you must obtain the
  179.     <a href="http://www.apache.org/dist/httpd/KEYS"><code>KEYS</code></a>
  180.     file from the Apache distribution site, too. (To assure that the
  181.     <code>KEYS</code> file itself has not been modified, it may be a good
  182.     idea to use a file from a previous distribution of Apache or import
  183.     the keys from a public key server.) The keys are imported into
  184.     your personal key ring using one of the following commands (depending
  185.     on your pgp version):</p>
  186.  
  187. <div class="example"><p><code>$ pgp < KEYS</code></p></div>
  188.  
  189.     <p>or </p>
  190.  
  191. <div class="example"><p><code>$ gpg --import KEYS</code></p></div>
  192.  
  193.     <p>The next step is to test the tarball against the PGP
  194.     signature, which should always be obtained from the <a href="http://httpd.apache.org/download.cgi">main Apache
  195.     website</a>. A link to the signature file is placed behind the
  196.     corresponding download link or may be found in the particular
  197.     directory at the <a href="http://www.apache.org/dist/httpd/">Apache
  198.     distribution site</a>. Its filename is identical to the source
  199.     tarball with the addition of <code>.asc</code>. Then you can check
  200.     the distribution with one of the following commands (again,
  201.     depending on your pgp version):</p>
  202.  
  203. <div class="example"><p><code>$ pgp httpd-2_0_<em>NN</em>.tar.gz.asc</code></p></div>
  204.  
  205.     <p>or</p>
  206.  
  207. <div class="example"><p><code>$ gpg --verify httpd-2_0_<em>NN</em>.tar.gz.asc</code></p></div>
  208.  
  209.     <p>You should receive a message like</p>
  210.  
  211. <div class="example"><p><code>Good signature from user "Martin Kraemer
  212.       <martin@apache.org>".</code></p></div>
  213.  
  214.     <p>Depending on the trust relationships contained in your key
  215.     ring, you may also receive a message saying that the
  216.     relationship between the key and the signer of the key cannot
  217.     be verified. This is not a problem if you trust the
  218.     authenticity of the <code>KEYS</code> file.</p>
  219.  
  220. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  221. <div class="section">
  222. <h2><a name="extract" id="extract">Extract</a></h2>
  223.  
  224.     <p>Extracting the source from the Apache HTTPD tarball is a
  225.     simple matter of uncompressing, and then untarring:</p>
  226.  
  227. <div class="example"><p><code>
  228.       $ gzip -d httpd-2_0_<em>NN</em>.tar.gz<br />
  229.        $ tar xvf httpd-2_0_<em>NN</em>.tar
  230. </code></p></div>
  231.  
  232.     <p>This will create a new directory under the current directory
  233.     containing the source code for the distribution. You should
  234.     <code>cd</code> into that directory before proceeding with
  235.     compiling the server.</p>
  236. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  237. <div class="section">
  238. <h2><a name="configure" id="configure">Configuring the source tree</a></h2>
  239.  
  240.     <p>The next step is to configure the Apache source tree for
  241.     your particular platform and personal requirements. This is
  242.     done using the script <code>configure</code> included in the
  243.     root directory of the distribution. (Developers downloading the
  244.     CVS version of the Apache source tree will need to have
  245.     <code>autoconf</code> and <code>libtool</code> installed and
  246.     will need to run <code>buildconf</code> before proceeding with
  247.     the next steps. This is not necessary for official
  248.     releases.)</p>
  249.  
  250.     <p>To configure the source tree using all the default options,
  251.     simply type <code>./configure</code>. To change the default
  252.     options, <code>configure</code> accepts a variety of variables
  253.     and command line options. Environment variables are generally
  254.     placed before the <code>./configure</code> command, while other
  255.     options are placed after. The most important option here is the
  256.     location prefix where Apache is to be installed later, because
  257.     Apache has to be configured for this location to work
  258.     correctly. But there are a lot of other options available for
  259.     your pleasure.</p>
  260.  
  261.     <p>For a short impression of what possibilities you have, here
  262.     is a typical example which compiles Apache for the installation
  263.     tree <code>/sw/pkg/apache</code> with a particular compiler and flags
  264.     plus the two additional modules <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> and
  265.     <code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code> for
  266.     later loading through the DSO mechanism:</p>
  267.  
  268. <div class="example"><p><code>
  269.       $ CC="pgcc" CFLAGS="-O2" \<br />
  270.        ./configure --prefix=/sw/pkg/apache \<br />
  271.        --enable-rewrite=shared \<br />
  272.        --enable-speling=shared
  273. </code></p></div>
  274.  
  275.     <p>When <code>configure</code> is run it will take several minutes to
  276.     test for the availability of features on your system and build
  277.     Makefiles which will later be used to compile the server.</p>
  278.  
  279.     <p>The easiest way to find all of the configuration flags for
  280.     Apache is to run <code>./configure --help</code>. What follows is a
  281.     brief description of most of the arguments and environment
  282.     variables.</p>
  283.  
  284. <h3><a name="environment" id="environment">Environment Variables</a></h3>
  285.  
  286.     <p>The <code>autoconf</code> build process uses several environment
  287.     variables to configure the build environment. In general, these
  288.     variables change the method used to build Apache, but not the
  289.     eventual features of the server. These variables can be placed
  290.     in the environment before invoking <code>configure</code>, but
  291.     it is usually easier to specify them on the
  292.     <code>configure</code> command line as demonstrated in the
  293.     example above.</p>
  294.  
  295.     <dl>
  296.       <dt><code>CC=...</code></dt>
  297.  
  298.       <dd>The name of the C compiler command.</dd>
  299.  
  300.       <dt><code>CPPFLAGS=...</code></dt>
  301.  
  302.       <dd>Miscellaneous C preprocessor and compiler options.</dd>
  303.  
  304.       <dt><code>CFLAGS=...</code></dt>
  305.  
  306.       <dd>Debugging and optimization options for the C
  307.       compiler.</dd>
  308.  
  309.       <dt><code>LDFLAGS=...</code></dt>
  310.  
  311.       <dd>Miscellaneous options to be passed to the linker.</dd>
  312.  
  313.       <dt><code>LIBS=...</code></dt>
  314.  
  315.       <dd>Library location information ("<code>-L</code>" and
  316.       "<code>-l</code>" options) to pass to the linker.</dd>
  317.  
  318.       <dt><code>INCLUDES=...</code></dt>
  319.  
  320.       <dd>Header file search directories ("<code>-I<em>dir</em></code>").</dd>
  321.  
  322.       <dt><code>TARGET=...</code> [Default: <code>httpd</code>]</dt>
  323.  
  324.       <dd>Name of the executable which will be built.</dd>
  325.  
  326.       <dt><code>NOTEST_CPPFLAGS=...</code></dt>
  327.  
  328.       <dt><code>NOTEST_CFLAGS=...</code></dt>
  329.  
  330.       <dt><code>NOTEST_LDFLAGS=...</code></dt>
  331.  
  332.       <dt><code>NOTEST_LIBS=...</code></dt>
  333.  
  334.       <dd>These variables share the same function as their
  335.       non-<code>NOTEST</code> namesakes. However, the variables are
  336.       applied to the build process only after autoconf has performed its
  337.       feature testing. This allows the inclusion of flags which
  338.       will cause problems during feature testing, but must be used
  339.       for the final compilation.</dd>
  340.  
  341.       <dt><code>SHLIB_PATH=...</code></dt>
  342.  
  343.       <dd>Options which specify shared library paths for the
  344.       compiler and linker.</dd>
  345.     </dl>
  346.  
  347.  
  348. <h3><a name="output" id="output">autoconf Output Options</a></h3>
  349.  
  350.     <dl>
  351.       <dt><code>--help</code></dt>
  352.  
  353.       <dd>Prints the usage message including all available options,
  354.       but does not actually configure anything.</dd>
  355.  
  356.       <dt><code>--quiet</code></dt>
  357.  
  358.       <dd>Prevents the printing of the usual "<code>checking...</code>"
  359.       messages.</dd>
  360.  
  361.       <dt><code>--verbose</code></dt>
  362.  
  363.       <dd>Prints much more information during the configuration
  364.       process, including the names of all the files examined.</dd>
  365.     </dl>
  366.  
  367.  
  368. <h3><a name="pathnames" id="pathnames">Pathnames</a></h3>
  369.  
  370.     <p>There are currently two ways to configure the pathnames
  371.     under which Apache will install its files. First, you can
  372.     specify a directory and have Apache install itself under that
  373.     directory in its default locations.</p>
  374.  
  375.     <dl>
  376.       <dt><code>--prefix=<em>PREFIX</em></code> [Default:
  377.       <code>/usr/local/apache2</code>]</dt>
  378.  
  379.       <dd>Specifies the directory under which the Apache files will
  380.       be installed.</dd>
  381.     </dl>
  382.  
  383.     <p>It is possible to specify that architecture-dependent files
  384.     should be placed under a different directory.</p>
  385.  
  386.     <dl>
  387.       <dt><code>--exec-prefix=<em>EPREFIX</em></code> [Default:
  388.       <code><em>PREFIX</em></code>]</dt>
  389.  
  390.       <dd>Specifies the directory under which
  391.       architecture-dependent files will be placed.</dd>
  392.     </dl>
  393.  
  394.     <p>The second, and more flexible way to configure the install
  395.     path locations for Apache is using the
  396.     <code>config.layout</code> file. Using this method, it is
  397.     possible to separately specify the location for each type of
  398.     file within the Apache installation. The
  399.     <code>config.layout</code> file contains several example
  400.     configurations, and you can also create your own custom
  401.     configuration following the examples. The different layouts in
  402.     this file are grouped into <code><Layout
  403.     FOO>...</Layout></code> sections and referred to by
  404.     name as in <code>FOO</code>.</p>
  405.  
  406.     <dl>
  407.       <dt><code>--enable-layout=<em>LAYOUT</em></code></dt>
  408.  
  409.       <dd>Use the named layout in the <code>config.layout</code>
  410.       file to specify the installation paths.</dd>
  411.     </dl>
  412.  
  413.  
  414.  
  415. <h3><a name="modules" id="modules">Modules</a></h3>
  416.  
  417.     <p>Apache is a modular server. Only the most basic
  418.     functionality is included in the core server. Extended features
  419.     are available in various modules. During the configuration
  420.     process, you must select which modules to compile for use with
  421.     your server. You can view a <a href="mod/">list of modules</a> included in
  422.     the documentation. Those modules with a <a href="mod/module-dict.html#Status">status</a> of "Base" are
  423.     included by default and must be specifically disabled if you do
  424.     not want them (e.g. <code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code>). Modules with any
  425.     other status must be specifically enabled if you wish to use them
  426.     (e.g. <code class="module"><a href="./mod/mod_expires.html">mod_expires</a></code>).</p>
  427.  
  428.     <p>There are two ways for a module to be compiled and used with
  429.     Apache. Modules may be <em>statically compiled</em>, which
  430.     means that they are permanently included in the Apache binary.
  431.     Alternatively, if your operating system supports Dynamic Shared
  432.     Objects (DSOs) and <code>autoconf</code> can detect that support, then
  433.     modules may be <em>dynamically compiled</em>. DSO modules are
  434.     stored separately from the Apache binary, and may be included
  435.     or excluded from the server using the run-time configuration
  436.     directives provided by <code class="module"><a href="./mod/mod_so.html">mod_so</a></code>.
  437.     The mod_so is automatically included in the server if any
  438.     dynamic modules are included in the compilation. If you would
  439.     like to make your server capable of loading DSOs without
  440.     actually compiling any dynamic modules, you can explicitly
  441.     <code>--enable-so</code>.</p>
  442.  
  443.     <dl>
  444.       <dt><code>--enable-<em>MODULE</em>[=shared]</code></dt>
  445.  
  446.       <dd>Compile and include the module <em>MODULE</em>. The
  447.       identifier <em>MODULE</em> is the <a href="mod/module-dict.html#ModuleIdentifier">Module
  448.       Identifier</a> from the module documentation without the
  449.       "_module" string. To compile the module as a DSO, add the
  450.       option <code>=shared</code>.</dd>
  451.  
  452.       <dt><code>--disable-<em>MODULE</em></code></dt>
  453.  
  454.       <dd>Remove the module <em>MODULE</em> which would otherwise
  455.       be compiled and included.</dd>
  456.  
  457.       <dt><code>--enable-modules=<em>MODULE-LIST</em></code></dt>
  458.  
  459.       <dd>Compile and include the modules listed in the
  460.       space-separated <em>MODULE-LIST</em>.</dd>
  461.  
  462.       <dt>
  463.       <code>--enable-mods-shared=<em>MODULE-LIST</em></code></dt>
  464.  
  465.       <dd>Compile and include the modules in the space-separated
  466.       <em>MODULE-LIST</em> as dynamically loadable (DSO)
  467.       modules.</dd>
  468.     </dl>
  469.  
  470.     <p>The <em>MODULE-LIST</em> in the
  471.     <code>--enable-modules</code> and
  472.     <code>--enable-mods-shared</code> options is usually a
  473.     space-separated list of module identifiers. For example, to
  474.     enable <code class="module"><a href="./mod/mod_dav.html">mod_dav</a></code> and <code class="module"><a href="./mod/mod_info.html">mod_info</a></code>,
  475.     you can either use</p>
  476.  
  477. <div class="example"><p><code>./configure --enable-dav --enable-info</code></p></div>
  478.  
  479.     <p>or, equivalently,</p>
  480.  
  481. <div class="example"><p><code>./configure --enable-modules="dav info"</code></p></div>
  482.  
  483.     <p>In addition, the special keywords <code>all</code> or
  484.     <code>most</code> can be used to add all or most of the modules
  485.     in one step. You can then remove any modules that you do not
  486.     want with the <code>--disable-<em>MODULE</em></code> option.
  487.     For example, to include all modules as DSOs with the exception
  488.     of <code class="module"><a href="./mod/mod_info.html">mod_info</a></code>, you can use</p>
  489.  
  490. <div class="example"><p><code>
  491.       ./configure --enable-mods-shared=all
  492.       --disable-info
  493. </code></p></div>
  494.  
  495.     <p>In addition to the standard set of modules, Apache 2.0 also
  496.     includes a choice of <a href="mpm.html">Multi-Processing
  497.     Modules</a> (MPMs). One, and only one MPM must be included in
  498.     the compilation process. The default MPMs for each platform are
  499.     listed on the <a href="mpm.html">MPM documentation page</a>,
  500.     but can be overridden on the <code>configure</code> command
  501.     line.</p>
  502.  
  503.     <dl>
  504.       <dt><code>--with-mpm=<em>NAME</em></code></dt>
  505.  
  506.       <dd>Choose the mpm <em>NAME</em>.</dd>
  507.     </dl>
  508.  
  509.     <p>To activate an MPM called <var>mpm_name</var>, you can use</p>
  510.  
  511. <div class="example"><p><code>
  512.      ./configure --with-mpm=<var>mpm_name</var>
  513. </code></p></div>
  514.  
  515.  
  516.  
  517. <h3><a name="dbm" id="dbm">DBM</a></h3>
  518.  
  519.     <p>Several Apache features, including
  520.     <code class="module"><a href="./mod/mod_auth_dbm.html">mod_auth_dbm</a></code> and <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code>'s
  521.     DBM <code class="directive"><a href="./mod/mod_rewrite.html#rewritemap">RewriteMap</a></code> use
  522.     simple key/value databases for quick lookups of information.  Apache
  523.     includes SDBM with its source-code, so this database is always
  524.     available.  If you would like to use other database types, the
  525.     following <code>configure</code> options are available:</p>
  526.  
  527. <dl>
  528. <dt><code>--with-gdbm[=<em>path</em>]</code></dt>
  529. <dt><code>--with-ndbm[=<em>path</em>]</code></dt>
  530. <dt><code>--with-berkeley-db[=<em>path</em>]</code></dt>
  531.  
  532. <dd>If no <em>path</em> is specified, Apache will search for the
  533. include files and libraries in the usual search paths.  An explicit
  534. <em>path</em> will cause Apache to look in
  535. <em>path</em><code>/lib</code> and
  536. <em>path</em><code>/include</code> for the relevant files.  Finally,
  537. the <em>path</em> may specify specific include and library paths
  538. separated by a colon.</dd>
  539. </dl>
  540.  
  541.  
  542.  
  543. <h3><a name="suexec" id="suexec">Suexec</a></h3>
  544.  
  545.     <p>Apache includes a support program called <a href="suexec.html">suexec</a> which can be used to isolate user
  546.     CGI programs. However, if suexec is improperly configured, it
  547.     can cause serious security problems. Therefore, you should
  548.     carefully read and consider the <a href="suexec.html">suexec
  549.     documentation</a> before implementing this feature.</p>
  550.  
  551. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  552. <div class="section">
  553. <h2><a name="compile" id="compile">Build</a></h2>
  554.  
  555.     <p>Now you can build the various parts which form the Apache
  556.     package by simply running the command:</p>
  557.  
  558. <div class="example"><p><code>$ make</code></p></div>
  559.  
  560.     <p>Please be patient here, since a base configuration takes
  561.     approximately 3 minutes to compile under a Pentium III/Linux
  562.     2.2 system, but this will vary widely depending on your
  563.     hardware and the number of modules which you have enabled.</p>
  564. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  565. <div class="section">
  566. <h2><a name="install" id="install">Install</a></h2>
  567.  
  568.     <p>Now it's time to install the package under the configured
  569.     installation <em>PREFIX</em> (see <code>--prefix</code> option
  570.     above) by running:</p>
  571.  
  572. <div class="example"><p><code>$ make install</code></p></div>
  573.  
  574.     <p>If you are upgrading, the installation will not overwrite
  575.     your configuration files or documents.</p>
  576. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  577. <div class="section">
  578. <h2><a name="customize" id="customize">Customize</a></h2>
  579.  
  580.     <p>Next, you can customize your Apache HTTP server by editing
  581.     the <a href="configuring.html">configuration files</a> under
  582.     <code><em>PREFIX</em>/conf/</code>.</p>
  583.  
  584. <div class="example"><p><code>$ vi <em>PREFIX</em>/conf/httpd.conf</code></p></div>
  585.  
  586.     <p>Have a look at the Apache manual under <a href="./">docs/manual/</a> or consult <a href="http://httpd.apache.org/docs-2.0/">http://httpd.apache.org/docs-2.0/</a> for the most recent version of
  587.     this manual and a complete reference of available <a href="mod/directives.html">configuration directives</a>.</p>
  588. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  589. <div class="section">
  590. <h2><a name="test" id="test">Test</a></h2>
  591.  
  592.     <p>Now you can <a href="invoking.html">start</a> your Apache
  593.     HTTP server by immediately running:</p>
  594.  
  595. <div class="example"><p><code>$ <em>PREFIX</em>/bin/apachectl start</code></p></div>
  596.  
  597.     <p>and then you should be able to request your first document
  598.     via URL <code>http://localhost/</code>. The web page you see is located
  599.     under the <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code>
  600.     which will usually be <code><em>PREFIX</em>/htdocs/</code>.
  601.     Then <a href="stopping.html">stop</a> the server again by
  602.     running:</p>
  603.  
  604. <div class="example"><p><code>$ <em>PREFIX</em>/bin/apachectl stop</code></p></div>
  605. </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
  606. <div class="section">
  607. <h2><a name="upgrading" id="upgrading">Upgrading</a></h2>
  608.  
  609.     <p>The first step in upgrading is to read the release announcement
  610.     and the file <code>CHANGES</code> in the source distribution to
  611.     find any changes that may affect your site.  When changing between
  612.     major releases (for example, from 1.3 to 2.0 or from 2.0 to 2.2),
  613.     there will likely be major differences in the compile-time and
  614.     run-time configuration that will require manual adjustments.  All
  615.     modules will also need to be upgraded to accomodate changes in the
  616.     module API.</p>
  617.  
  618.     <p>Upgrading from one minor version to the next (for example, from
  619.     2.0.55 to 2.0.57) is easier.  The <code>make install</code>
  620.     process will not overwrite any of your existing documents, log
  621.     files, or configuration files.  In addition, the developers make
  622.     every effort to avoid incompatible changes in the
  623.     <code>configure</code> options, run-time configuration, or the
  624.     module API between minor versions.  In most cases you should be able to
  625.     use an identical <code>configure</code> command line, an identical
  626.     configuration file, and all of your modules should continue to
  627.     work.  (This is only valid for versions after 2.0.41; earlier
  628.     versions have incompatible changes.)</p>
  629.  
  630.     <p>If you kept the source tree from your last installation,
  631.     upgrading is even easier.  The file <code>config.nice</code> in
  632.     the root of the old source tree contains the exact
  633.     <code>configure</code> command line that you used to configure the
  634.     source tree.  Then to upgrade from one version to the next, you
  635.     need only copy the <code>config.nice</code> file to the source
  636.     tree of the new version, edit it to make any desired changes, and
  637.     then run:</p>
  638.  
  639.     <div class="example"><p><code>
  640.     $ ./config.nice<br />
  641.     $ make<br />
  642.     $ make install<br />
  643.     $ <em>PREFIX</em>/bin/apachectl stop<br />
  644.     $ <em>PREFIX</em>/bin/apachectl start<br />
  645.     </code></p></div>
  646.  
  647.     <div class="warning">You should always test any new version in your
  648.     environment before putting it into production.  For example, you
  649.     can install and run the new version along side the old one by
  650.     using a different <code>--prefix</code> and a
  651.     different port (by adjusting the <code class="directive"><a href="./mod/mpm_common.html#listen">Listen</a></code> directive) to test for any
  652.     incompatibilities before doing the final upgrade.</div>
  653. </div></div>
  654. <div class="bottomlang">
  655. <p><span>Available Languages: </span><a href="./de/install.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
  656. <a href="./en/install.html" title="English"> en </a> |
  657. <a href="./ja/install.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
  658. <a href="./ko/install.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
  659. <a href="./ru/install.html" hreflang="ru" rel="alternate" title="Russian"> ru </a></p>
  660. </div><div id="footer">
  661. <p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p>
  662. <p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p></div>
  663. </body></html>