glfs/content/web/apache.xml
Randy McMurchy faa80ab0ab Added new package Doxygen-1.3.9.1
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2886 af4574ff-66df-0310-9fd7-8a98e5e911e0
2004-10-31 00:03:02 +00:00

246 lines
9.1 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY apache-download-http "http://www.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2">
<!ENTITY apache-download-ftp "ftp://ftp.tux.org/pub/net/apache/dist/httpd/httpd-&apache-version;.tar.bz2">
<!ENTITY apache-md5sum "0e1b47c53921a1fc8fb006effdb3bf1c">
<!ENTITY apache-size "5.2 MB">
<!ENTITY apache-buildsize "78 MB">
<!ENTITY apache-time "1.12 SBU">
]>
<sect1 id="apache" xreflabel="Apache-&apache-version;">
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<?dbhtml filename="apache.html"?>
<title>Apache-&apache-version;</title>
<sect2>
<title>Introduction to <application>Apache</application></title>
<para>The <application>Apache</application> package contains an
open-source <acronym>HTTP</acronym> server. It is
useful for creating local intranet web sites or running huge web serving
operations.</para>
<sect3><title>Package information</title>
<itemizedlist spacing='compact'>
<listitem><para>Download (HTTP):
<ulink url="&apache-download-http;"/></para></listitem>
<listitem><para>Download (FTP):
<ulink url="&apache-download-ftp;"/></para></listitem>
<listitem><para>MD5 sum: &apache-md5sum;</para></listitem>
<listitem><para>Download size: &apache-size;</para></listitem>
<listitem><para>Estimated Disk space required:
&apache-buildsize;</para></listitem>
<listitem><para>Estimated build time: &apache-time;</para></listitem>
</itemizedlist>
</sect3>
<sect3><title>Additional downloads</title>
<itemizedlist spacing='compact'>
<listitem><para>Required Patch: <ulink
url="&patch-root;/httpd-&apache-version;-config-1.patch"/></para></listitem>
</itemizedlist></sect3>
<sect3><title><application>Apache</application> dependencies</title>
<sect4><title>Optional</title>
<para><xref linkend="db"/> or <xref linkend="gdbm"/>,
<xref linkend="openssl"/>,
<xref linkend="openldap"/>,
<xref linkend="expat"/> and
<xref linkend="doxygen"/></para>
</sect4>
</sect3>
</sect2>
<sect2>
<title>Installation of <application>Apache</application></title>
<para>For security reasons, running the server as an unprivileged user and
group is strongly encouraged.</para>
<screen><userinput><command>groupadd apache &amp;&amp;
useradd -c apache -d /dev/null -g apache -s /bin/false apache</command></userinput></screen>
<para>The following patch will define the layout of destination directories
and, among them, the build directory at
<filename class="directory">/usr/lib/apache/build</filename>. This
will allow the modules added to <application>Apache</application> to
be configured without errors. Apply the patch:</para>
<screen><userinput><command>patch -Np1 -i ../httpd-&apache-version;-config-1.patch</command></userinput></screen>
<para>Build and install <application>Apache</application> by running the
following commands:</para>
<screen><userinput><command>./configure --enable-layout=FHS \
--enable-mods-shared=all &amp;&amp;
make &amp;&amp;
make install &amp;&amp;
chown root:root /usr/sbin/{apxs,apachectl,dbmmanage,envvars-std,envvars} \
/usr/include/apache/* /usr/lib/apache/httpd.exp \
/usr/share/man/man1/{dbmmanage,htdigest,htpasswd}.1 \
/usr/share/man/man8/{ab,apachectl,apxs,httpd,logresolve,rotatelogs,suexec}.8 &amp;&amp;
chown -R apache:apache /srv/www</command></userinput></screen>
</sect2>
<sect2>
<title>Command explanations</title>
<para><option>--with-expat=/usr</option>: Uses system installed
<application>expat</application>. <emphasis>If you have installed
<application>expat</application> and do not use this switch, the
<application>Apache</application> installation may overwrite some files from
the <application>expat</application> installation.</emphasis></para>
<para><parameter>--enable-mods-shared=all</parameter>: The modules should be
compiled and used as Dynamic Shared Objects
(<acronym>DSO</acronym>s) so they can be included and excluded from the
server using the run-time configuration directives.</para>
<para><option>--enable-ssl</option>: Use this switch
to create the <filename class="libraryfile">mod_ssl</filename>
module and enable <acronym>SSL</acronym> support.</para>
<para><command>chown root:root ...</command>: This command changes
the ownership of some installed files, the result of building the package as a
user other than root.</para>
<para><command>chown -R apache:apache /srv/www</command>: By default, the
installation process installs files (documentation, error messages, default
icons, etc.) with the ownership of the user that extracted the files from the
tar file. If you want to change the ownership to another user, you should do
so at this point. The only requirement is that the document directories need
to be accessable by the <command>httpd</command> process with (r-x) permissions
and files need to be readable (r--) by the apache user.</para>
</sect2>
<sect2>
<title>Configuring <application>Apache</application></title>
<sect3>
<title>Config files</title>
<para><filename>/etc/apache/*</filename></para>
</sect3>
<sect3>
<title>Configuration Information</title>
<para>The main configuration file is named <filename>httpd.conf</filename>.
Modify it to run the server as a dedicated user:</para>
<screen><userinput><command>sed -i -e "s%User nobody%User apache%" \
-e "s%^Group #-1%Group apache%" \
/etc/apache/httpd.conf</command></userinput></screen>
<para>See <ulink url="http://httpd.apache.org/docs-2.0/configuring.html"/> for
detailed instructions on customizing your <application>Apache</application>
<acronym>HTTP</acronym> server.</para>
<para>There's a problem with the ISAPI <acronym>DSO</acronym> module
caused from compiling with
<application><acronym>GCC</acronym></application>-3.4.1. Comment out the
module from the configuration file with the following command:</para>
<screen><userinput><command>sed -i -e "s/^LoadModule isapi_module/# &amp;/" \
/etc/apache/httpd.conf</command></userinput></screen>
<para>Install the <filename>/etc/rc.d/init.d/apache</filename>
init script included in the <xref linkend="intro-important-bootscripts"/>
package.</para>
<screen><userinput><command>make install-apache</command></userinput></screen>
</sect3>
</sect2>
<sect2>
<title>Contents</title>
<para>The <application>Apache</application> package provides
<command>ab</command>,
<command>apachectl</command>,
<command>apr-config</command>,
<command>apu-config</command>,
<command>apxs</command>,
<command>checkgid</command>,
<command>dbmmanage</command>,
<command>htdbm</command>,
<command>htdigest</command>,
<command>htpasswd</command>,
<command>httpd</command>,
<command>instdso.sh</command>,
<command>logresolve</command>,
<command>rotatelogs</command>,
<filename class="libraryfile">libapr</filename>,
<filename class="libraryfile">libaprutil</filename> and
various modules.</para>
</sect2>
<sect2><title>Description</title>
<sect3><title>ab</title>
<para><command>ab</command> is a tool for benchmarking your
<application>Apache</application> <acronym>HTTP</acronym> server.
</para></sect3>
<sect3><title>apachectl</title>
<para><command>apachectl</command> is a front end to the
<application>Apache</application> <acronym>HTTP</acronym>
server which is designed to help the administrator control the
functioning of the <application>Apache</application> httpd daemon.</para>
</sect3>
<sect3><title>apxs</title>
<para><command>apxs</command>
is a tool for building and installing extension modules for the
<application>Apache</application> <acronym>HTTP</acronym> server.</para></sect3>
<sect3><title>dbmmanage</title>
<para><command>dbmmanage</command> is used to create and update the
<filename>DBM</filename> format files used to store usernames and passwords
for basic authentication of <acronym>HTTP</acronym>
users.</para></sect3>
<sect3><title>htdigest</title>
<para><command>htdigest</command> is used to create and update the
flat-files used to store usernames, realms and passwords for digest
authentication of <acronym>HTTP</acronym> users.</para></sect3>
<sect3><title>htpasswd</title>
<para><command>htpasswd</command> is used to create and update the
flat-files used to store usernames and passwords for basic authentication of
<acronym>HTTP</acronym> users.</para></sect3>
<sect3><title>httpd</title>
<para><command>httpd</command> is the <application>Apache</application>
<acronym>HTTP</acronym> server program.</para></sect3>
<sect3><title>instdso.sh</title>
<para><command>instdso.sh</command> is a script which installs
<application>Apache</application> <acronym>DSO</acronym> modules.</para></sect3>
<sect3><title>logresolve</title>
<para><command>logresolve</command> is a post-processing program to
resolve <acronym>IP</acronym>-addresses in <application>Apache</application>'s
access log files.</para></sect3>
<sect3><title>rotatelogs</title>
<para><command>rotatelogs</command> is a simple program for use in conjunction
with <application>Apache</application>'s piped log file feature.</para></sect3>
</sect2>
</sect1>