install.html revision c1b845ec9ccb864cf169476c2fbc864410aec484
2426N/A<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2426N/A<HTML>
2426N/A<HEAD>
2426N/A<TITLE>Compiling and Installing Apache</TITLE>
2426N/A</HEAD>
2426N/A
2426N/A<BODY>
2426N/A<!--#include virtual="header.html" -->
2426N/A<h1>Compiling and Installing Apache 1.2</h1>
2426N/AIf you wish to download and install an earlier version of Apache please
2426N/Aread <a href="install_1_1.html">Compiling and Installing Apache 1.1</a>.
2426N/A
2426N/A<h2>Downloading Apache</h2>
2426N/AInformation on the latest version of Apache can be found on the Apache
2426N/Aweb server at
2426N/A<a href="http://www.apache.org/">http://www.apache.org/</a>.
2426N/AThis will list the current release,
2426N/Aany more recent beta-test release, together with details of mirror
2426N/Aweb and anonymous ftp sites.
2426N/A
2426N/A<h2>Compiling Apache</h2>
2426N/AThis release of Apache supports the notion of `optional modules'.
2426N/AHowever, the server has to know which modules are compiled into it, in
2426N/Aorder for those modules to be effective; this requires generation of a
2426N/Ashort bit of code (`<code>modules.c</code>') which simply has a list of them.
2426N/A<p>
2426N/AIt is also necessary to choose the correct options for your platform.
2426N/A
2426N/ATo do this:
2426N/A<ol>
2426N/A<li>
2426N/ACopy the file "<code>Configuration.tmpl</code>" to
2426N/A"<code>Configuration</code>" and then edit
2426N/A"<code>Configuration</code>". This contains the list and settings of various
2426N/A"Rules" and an additional section at the bottom which
2426N/Alists the modules which have been compiled in, and also names the
2426N/Afiles containing them. You will need to:
2426N/A<ul>
2426N/A<p><LI> Adjust the Rules and <code>EXTRA_CFLAGS|LIBS|LFLAGS|INCLUDES</code> if
2426N/A you feel so inclined.
2426N/A
2426N/A<p><li> Uncomment lines corresponding to those optional modules you wish
2426N/A to include (among the Module lines at the bottom of the file),
2426N/A or add new lines corresponding to custom modules you have written.
2426N/A (See <a href="misc/API.html">API.html</a> for preliminary docs on how to do that).
2426N/A</ul><p>
2426N/A Note that DBM auth has to be explicitly configured in, if you want
2426N/A it --- just uncomment the corresponding line.
2426N/A
2426N/A
2426N/A<p><li> Run the "<code>Configure</code>" script:
2426N/A<blockquote><pre>
2426N/A % Configure
2426N/A Using 'Configuration' as config file
2426N/A + configured for <whatever> platform
2426N/A + setting C compiler to <whatever> *
2426N/A + setting C compiler optimization-level to <whatever> *
2426N/A %
2426N/A</pre></blockquote>
2426N/A This generates new versions of the Makefile and of modules.c. (If
2426N/A you want to maintain multiple configurations, you can say, e.g.,
2426N/A<blockquote><pre>
2426N/A % Configure -file Configuration.ai
2426N/A Using alternate config file Configuration.ai
2426N/A + configured for <whatever> platform
2426N/A + setting C compiler to <whatever> *
2426N/A + setting C compiler optimization-level to <whatever> *
2426N/A %
2426N/A</pre></blockquote><p>
2426N/A*: Depending on Configuration and your system, Configure
2426N/A make not print these lines. That's OK
2426N/A
2426N/A<p><li> Type "<code>make</code>".
2426N/A<p>
2426N/AThe modules we place in the Apache distribution are the ones we have
2426N/Atested and are used regularly by various members of the Apache
2426N/Adevelopment group. Additional modules contributed by members or third
2426N/Aparties with specific needs or functions are available at
2426N/A<a href="http://www.apache.org/dist/contrib/modules/"><URL:http://www.apache.org/dist/contrib/modules/></a>.
2426N/AThere are
2426N/Ainstructions on that page for linking these modules into the
2426N/Acore Apache code.
2426N/A</ol>
2426N/A<h2>Installing Apache</h2>
2426N/AAfter compilation, you will have a binary called `httpd' in the
2426N/A<code>src/</code> directory. A binary distribution of Apache will supply this
2426N/Afile.
2426N/A<p>
2426N/AThe next step is to edit the configuration files for the server. In
2426N/Athe subdirectory called `conf' you should find distribution versions
2426N/Aof the three configuration files: <code>srm.conf-dist</code>,
2426N/A<code>access.conf-dist</code> and <code>httpd.conf-dist</code>. Copy them to
2426N/A<code>srm.conf</code>, <code>access.conf</code> and <code>httpd.conf</code>
2426N/Arespectively.
2426N/A<p>
2426N/AFirst edit <code>httpd.conf</code>. This sets up general attributes about the
2426N/Aserver; the port number, the user it runs as, etc. Next edit the
2426N/A<code>srm.conf</code> file; this sets up the root of the document tree,
2426N/Aspecial functions like server-parsed HTML or internal imagemap parsing, etc.
2426N/AFinally, edit the <code>access.conf</code> file to at least set the base cases
2426N/Aof access.
2426N/A<p>
2426N/AFinally, make a call to httpd, with a -f to the full path to the
2426N/Ahttpd.conf file. I.e., the common case:
2426N/A<blockquote><code>
2426N/A /usr/local/etc/apache/src/httpd -f /usr/local/etc/apache/conf/httpd.conf
2426N/A</code></blockquote>
2426N/AThe server should be now running.
2426N/A<p>
2426N/ABy default the <code>srm.conf</code> and <code>access.conf</code> files are
2426N/Alocated by name; to specifically call them by other names, use the
2426N/A<A HREF="core.html#accessconfig">AccessConfig</A> and
2426N/A<A HREF="core.html#resourceconfig">ResourceConfig</A> directives in
2426N/A<code>httpd.conf</code>.
2426N/A
2426N/A<!--#include virtual="footer.html" -->
2426N/A</BODY>
2426N/A</HTML>
2426N/A