?? install.html.en
字號:
simple matter of uncompressing, and then untarring:</p>
<div class="example"><p><code>
$ gzip -d httpd-2_0_<em>NN</em>.tar.gz<br />
$ tar xvf httpd-2_0_<em>NN</em>.tar
</code></p></div>
<p>This will create a new directory under the current directory
containing the source code for the distribution. You should
<code>cd</code> into that directory before proceeding with
compiling the server.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="configure" id="configure">Configuring the source tree</a></h2>
<p>The next step is to configure the Apache source tree for your
particular platform and personal requirements. This is done using
the script <code class="program"><a href="./programs/configure.html">configure</a></code> included in
the root directory of the distribution. (Developers downloading
the CVS version of the Apache source tree will need to have
<code>autoconf</code> and <code>libtool</code> installed and will
need to run <code>buildconf</code> before proceeding with the next
steps. This is not necessary for official releases.)</p>
<p>To configure the source tree using all the default options,
simply type <code>./configure</code>. To change the default
options, <code class="program"><a href="./programs/configure.html">configure</a></code> accepts a variety of variables
and command line options.</p>
<p>The most important option is the location <code>--prefix</code>
where Apache is to be installed later, because Apache has to be
configured for this location to work correctly. More fine-tuned
control of the location of files is possible with additional <a href="programs/configure.html#installationdirectories">configure
options</a>.</p>
<p>Also at this point, you can specify which <a href="programs/configure.html#optionalfeatures">features</a> you
want included in Apache by enabling and disabling <a href="mod/">modules</a>. Apache comes with a <a href="mod/module-dict.html#Status">Base</a> set of modules included by
default. Other modules are enabled using the
<code>--enable-<var>module</var></code> option, where
<var>module</var> is the name of the module with the
<code>mod_</code> string removed and with any underscore converted
to a dash. You can also choose to compile modules as <a href="dso.html">shared objects (DSOs)</a> -- which can be loaded
or unloaded at runtime -- by using the option
<code>--enable-<var>module</var>=shared</code>. Similarly, you can
disable Base modules with the
<code>--disable-<var>module</var></code> option. Be careful when
using these options, since <code class="program"><a href="./programs/configure.html">configure</a></code> cannot warn you
if the module you specify does not exist; it will simply ignore the
option.</p>
<p>In addition, it is sometimes necessary to provide the
<code class="program"><a href="./programs/configure.html">configure</a></code> script with extra information about the
location of your compiler, libraries, or header files. This is
done by passing either environment variables or command line
options to <code class="program"><a href="./programs/configure.html">configure</a></code>. For more information, see the
<code class="program"><a href="./programs/configure.html">configure</a></code> manual page.</p>
<p>For a short impression of what possibilities you have, here
is a typical example which compiles Apache for the installation
tree <code>/sw/pkg/apache</code> with a particular compiler and flags
plus the two additional modules <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> and
<code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code> for
later loading through the DSO mechanism:</p>
<div class="example"><p><code>
$ CC="pgcc" CFLAGS="-O2" \<br />
./configure --prefix=/sw/pkg/apache \<br />
--enable-rewrite=shared \<br />
--enable-speling=shared
</code></p></div>
<p>When <code class="program"><a href="./programs/configure.html">configure</a></code> is run it will take several minutes to
test for the availability of features on your system and build
Makefiles which will later be used to compile the server.</p>
<p>Details on all the different <code class="program"><a href="./programs/configure.html">configure</a></code> options are
available on the <code class="program"><a href="./programs/configure.html">configure</a></code> manual page.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="compile" id="compile">Build</a></h2>
<p>Now you can build the various parts which form the Apache
package by simply running the command:</p>
<div class="example"><p><code>$ make</code></p></div>
<p>Please be patient here, since a base configuration takes
approximately 3 minutes to compile under a Pentium III/Linux
2.2 system, but this will vary widely depending on your
hardware and the number of modules which you have enabled.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="install" id="install">Install</a></h2>
<p>Now it's time to install the package under the configured
installation <em>PREFIX</em> (see <code>--prefix</code> option
above) by running:</p>
<div class="example"><p><code>$ make install</code></p></div>
<p>If you are upgrading, the installation will not overwrite
your configuration files or documents.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="customize" id="customize">Customize</a></h2>
<p>Next, you can customize your Apache HTTP server by editing
the <a href="configuring.html">configuration files</a> under
<code><em>PREFIX</em>/conf/</code>.</p>
<div class="example"><p><code>$ vi <em>PREFIX</em>/conf/httpd.conf</code></p></div>
<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 this manual and a complete reference of available <a href="mod/directives.html">configuration directives</a>.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="test" id="test">Test</a></h2>
<p>Now you can <a href="invoking.html">start</a> your Apache
HTTP server by immediately running:</p>
<div class="example"><p><code>$ <em>PREFIX</em>/bin/apachectl start</code></p></div>
<p>and then you should be able to request your first document
via URL <code>http://localhost/</code>. The web page you see is located
under the <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code>
which will usually be <code><em>PREFIX</em>/htdocs/</code>.
Then <a href="stopping.html">stop</a> the server again by
running:</p>
<div class="example"><p><code>$ <em>PREFIX</em>/bin/apachectl stop</code></p></div>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="upgrading" id="upgrading">Upgrading</a></h2>
<p>The first step in upgrading is to read the release announcement
and the file <code>CHANGES</code> in the source distribution to
find any changes that may affect your site. When changing between
major releases (for example, from 1.3 to 2.0 or from 2.0 to 2.2),
there will likely be major differences in the compile-time and
run-time configuration that will require manual adjustments. All
modules will also need to be upgraded to accomodate changes in the
module API.</p>
<p>Upgrading from one minor version to the next (for example, from
2.0.55 to 2.0.57) is easier. The <code>make install</code>
process will not overwrite any of your existing documents, log
files, or configuration files. In addition, the developers make
every effort to avoid incompatible changes in the
<code class="program"><a href="./programs/configure.html">configure</a></code> options, run-time configuration, or the
module API between minor versions. In most cases you should be able to
use an identical <code class="program"><a href="./programs/configure.html">configure</a></code> command line, an identical
configuration file, and all of your modules should continue to
work. (This is only valid for versions after 2.0.41; earlier
versions have incompatible changes.)</p>
<p>To upgrade across minor versions, start by finding the file
<code>config.nice</code> in the <code>build</code> directory of
your installed server or at the root of the source tree for your
old install. This will contain the exact
<code class="program"><a href="./programs/configure.html">configure</a></code> command line that you used to
configure the source tree. Then to upgrade from one version to
the next, you need only copy the <code>config.nice</code> file to
the source tree of the new version, edit it to make any desired
changes, and then run:</p>
<div class="example"><p><code>
$ ./config.nice<br />
$ make<br />
$ make install<br />
$ <em>PREFIX</em>/bin/apachectl stop<br />
$ <em>PREFIX</em>/bin/apachectl start<br />
</code></p></div>
<div class="warning">You should always test any new version in your
environment before putting it into production. For example, you
can install and run the new version along side the old one by
using a different <code>--prefix</code> and a
different port (by adjusting the <code class="directive"><a href="./mod/mpm_common.html#listen">Listen</a></code> directive) to test for any
incompatibilities before doing the final upgrade.</div>
</div></div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="./de/install.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
<a href="./en/install.html" title="English"> en </a> |
<a href="./es/install.html" hreflang="es" rel="alternate" title="Espa駉l"> es </a> |
<a href="./ja/install.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="./ko/install.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
<a href="./ru/install.html" hreflang="ru" rel="alternate" title="Russian"> ru </a></p>
</div><div id="footer">
<p class="apache">Copyright 2006 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<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>
</body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -