source: server/major/apache.xml@ ab7b9fc

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since ab7b9fc was ab7b9fc, checked in by DJ Lucas <dj@…>, 14 years ago

Updated to Berkeley DB 5.1.19.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@8642 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 16.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!-- <!ENTITY apache-download-http "http://www.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2"> -->
8 <!ENTITY apache-download-http "http://archive.apache.org/dist/httpd/httpd-&apache-version;.tar.bz2">
9 <!ENTITY apache-download-ftp "ftp://apache.mirrors.pair.com/httpd/httpd-&apache-version;.tar.bz2">
10 <!ENTITY apache-md5sum "016cec97337eccead2aad6a7c27f2e14">
11 <!ENTITY apache-size "4.9 MB">
12 <!ENTITY apache-buildsize "100 MB">
13 <!ENTITY apache-time "2.0 SBU">
14]>
15
16<sect1 id="apache" xreflabel="Apache-&apache-version;">
17 <?dbhtml filename="apache.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>Apache-&apache-version;</title>
25
26 <indexterm zone="apache">
27 <primary sortas="a-Apache">Apache</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to Apache</title>
32
33 <para>The <application>Apache</application> package contains an
34 open-source HTTP server. It is useful for creating local intranet
35 web sites or running huge web serving operations.</para>
36
37 <bridgehead renderas="sect3">Package Information</bridgehead>
38 <itemizedlist spacing="compact">
39 <listitem>
40 <para>Download (HTTP): <ulink url="&apache-download-http;"/></para>
41 </listitem>
42 <listitem>
43 <para>Download (FTP): <ulink url="&apache-download-ftp;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download MD5 sum: &apache-md5sum;</para>
47 </listitem>
48 <listitem>
49 <para>Download size: &apache-size;</para>
50 </listitem>
51 <listitem>
52 <para>Estimated disk space required: &apache-buildsize;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated build time: &apache-time;</para>
56 </listitem>
57 </itemizedlist>
58
59 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
60 <itemizedlist spacing='compact'>
61 <listitem>
62 <para>Required patch: <ulink
63 url="&patch-root;/httpd-&apache-version;-config-1.patch"/></para>
64 </listitem>
65 </itemizedlist>
66
67 <bridgehead renderas="sect3">Apache Dependencies</bridgehead>
68
69 <bridgehead renderas="sect4">Optional</bridgehead>
70 <para role="optional"><xref linkend="openldap"/>,
71 <xref linkend="pcre"/>,
72 <xref linkend="rsync"/>,
73 <xref linkend="lynx"/>,
74 <ulink url="http://apr.apache.org/">APR</ulink>,
75 <ulink url="http://apr.apache.org/">APR-util</ulink>, and
76 <ulink url="http://www.distcache.org/">distcache</ulink></para>
77
78 <bridgehead renderas="sect4">Optional (Only if Using the Bundled
79 APR-util)</bridgehead>
80 <para role="optional"><!-- <xref linkend="pkgconfig"/>, -->
81 <xref linkend="openssl"/>,
82 <xref linkend="expat"/>,
83 <!-- <xref linkend="gdbm"/>, -->
84 <xref linkend="db"/>,
85 <xref linkend="unixodbc"/>,
86 <xref linkend="postgresql"/>, and
87 <xref linkend="sqlite"/> or <xref linkend="db"/>
88 (with <application>SQLite3</application> compatibility)</para>
89
90 <para>Though you can install APR and APR-util as separate components,
91 it is recommended to use the bundled versions that come with the Apache
92 HTTPD tarball.</para>
93
94 <para condition="html" role="usernotes">User Notes:
95 <ulink url="&blfs-wiki;/apache"/></para>
96
97 </sect2>
98
99 <sect2 role="installation">
100 <title>Installation of Apache</title>
101
102 <para>For security reasons, running the server as an unprivileged user and
103 group is strongly encouraged. Create the following group and user using the
104 following commands
105 (as <systemitem class="username">root</systemitem>):</para>
106
107<screen role="root"><userinput>groupadd -g 25 apache &amp;&amp;
108useradd -c "Apache Server" -d /dev/null -g apache \
109 -s /bin/false -u 25 apache</userinput></screen>
110
111 <note><para>The above command directs the <application>Apache</application>
112 user's home directory to <filename>/dev/null</filename>. This may not work
113 for some add-ons such as <ulink
114 url='http://www.viewvc.org/'><application>ViewVC</application></ulink>, a
115 browser interface for CVS and Subversion version control repositories.
116 See the User Notes for details for specific applications.</para></note>
117
118 <para>The following patch modifies the layout of destination
119 directories and among them, the build directory at
120 <filename class="directory">/usr/lib/apache/build</filename>. This
121 will allow the modules added to <application>Apache</application>
122 to be configured without errors. Apply the patch:</para>
123
124<screen><userinput>patch -Np1 -i ../httpd-&apache-version;-config-1.patch</userinput></screen>
125
126 <note>
127 <para>You may wish to review the output from
128 <command>./configure --help</command> and include whatever parameters
129 are necessary to the <command>configure</command> command below to build
130 the modules required for your installation. There are as many as 62
131 additional parameters you can add to the <command>configure</command>
132 command to build additional modules. Some of the extra parameters which
133 aren't described or mentioned in the <parameter>--help</parameter>
134 information are listed in the <quote>Command Explanations</quote> section
135 below.</para>
136
137 <para>If you are using the bundled version of
138 <application>APR-util</application> and you are going to install
139 <application>Subversion</application> with
140 <application>Berkeley DB</application> back-end support, ensure you use
141 the parameters shown in the <quote>Command Explanations</quote> section
142 below.</para>
143
144 <para>While it is not built by default when using the following commands,
145 the ISAPI DSO module can be created by adding the <option>--enable-isapi</option>
146 option. Even the module will compile, install and load fine, the module is
147 <emphasis>only</emphasis> supported and functional in Win32
148 environments.</para>
149 </note>
150
151 <para>Build and install <application>Apache</application> by running the
152 following commands:</para>
153
154<screen><userinput>./configure --enable-layout=FHS \
155 --enable-mods-shared=all \
156 --enable-so &amp;&amp;
157make</userinput></screen>
158
159 <para>This package does not come with a test suite.</para>
160
161 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
162
163<screen role="root"><userinput>make install &amp;&amp;
164chown -v root:root /usr/lib/apache/httpd.exp \
165 /usr/sbin/{apxs,apachectl,dbmmanage,envvars{,-std}} \
166 /usr/share/man/man1/{dbmmanage,ht{dbm,digest,passwd}}.1 \
167 /usr/share/man/man8/{ab,apachectl,apxs,htcacheclean,httpd}.8 \
168 /usr/share/man/man8/{logresolve,rotatelogs,suexec}.8 &amp;&amp;
169chown -v -R apache:apache /srv/www</userinput></screen>
170
171 </sect2>
172
173 <sect2 role="commands">
174 <title>Command Explanations</title>
175
176 <!-- This is not required any longer. Finds and uses system installed
177 version of Expat without any issues
178 <para><option>-with-expat=/usr</option>: Uses the system installed
179 <application>expat</application>. <emphasis role="strong">If you have
180 installed <application>expat</application> and do not use this switch, the
181 <application>Apache</application> installation may overwrite some files
182 from the <application>expat</application> installation.</emphasis></para>
183 -->
184
185 <para><parameter>--enable-mods-shared=all</parameter>: The modules
186 should be compiled and used as Dynamic Shared Objects
187 (DSOs) so they can be included and excluded from the
188 server using the run-time configuration directives.</para>
189
190 <para><option>--enable-ssl</option>: Use this parameter
191 to create the <filename class="libraryfile">mod_ssl</filename>
192 module and enable SSL support. This parameter is mentioned as one of many
193 parameters which can be passed to the <command>configure</command> command
194 to create additional DSO modules. Note that it really only affects the
195 APR-Util sub-package, which the HTTPD installation then uses.</para>
196
197 <para><option>--with-pcre</option>: Add this parameter to use the system
198 installed version of the <application>PCRE</application> library.</para>
199
200 <para><option>--with-z</option>: Add this parameter to use the system
201 installed version of the <application>Zlib</application> library.</para>
202
203 <para><option>--with-ldap</option>: This parameter is required if you
204 passed the <option>--enable-authnz-ldap</option> or
205 <option>--enable-ldap</option> options to <command>configure</command>
206 and enabled the <application>OpenLDAP</application> modules.</para>
207
208 <para><option>--with-dbm=db4 --with-berkeley-db</option>: Use these
209 parameters if you require <application>Berkeley DB</application> support in
210 the bundled version of <application>APR-util</application> (required for
211 <application>Berkeley DB</application> back-end support in
212 <application>Subversion</application>).</para>
213
214 <para><command>chown root:root ...</command>: This command changes the
215 ownership of some installed files, the result of building the package as
216 a user other than <systemitem class="username">root</systemitem>.</para>
217
218 <para><command>chown -R apache:apache /srv/www</command>: By default, the
219 installation process installs files (documentation, error messages, default
220 icons, etc.) with the ownership of the user that extracted the files from
221 the tar file. If you want to change the ownership to another user, you
222 should do so at this point. The only requirement is that the document
223 directories need to be accessible by the <command>httpd</command> process
224 with (r-x) permissions and files need to be readable (r--) by the
225 <systemitem class="username">apache</systemitem> user.</para>
226
227 </sect2>
228
229 <sect2 role="configuration">
230 <title>Configuring Apache</title>
231
232 <sect3 id="apache-config">
233 <title>Config Files</title>
234
235 <para><filename>/etc/apache/*</filename></para>
236
237 <indexterm zone="apache apache-config">
238 <primary sortas="e-etc-apache">/etc/apache/*</primary>
239 </indexterm>
240
241 <indexterm zone="apache apache-config">
242 <primary sortas="e-etc-apache-httpd.conf">/etc/apache/httpd.conf</primary>
243 </indexterm>
244
245 </sect3>
246
247 <sect3>
248 <title>Configuration Information</title>
249
250 <para>The main configuration file is named
251 <filename>/etc/apache/httpd.conf</filename>. Modify it so that the HTTP
252 server runs as the dedicated user and group:</para>
253
254<screen role="root"><userinput>sed -i -e "s/User daemon/User apache/" \
255 -e "s/Group daemon/Group apache/" \
256 /etc/apache/httpd.conf</userinput></screen>
257
258 <para>See <ulink url="http://httpd.apache.org/docs-2.2/configuring.html"/>
259 for detailed instructions on customizing your
260 <application>Apache</application> HTTP server configuration file.</para>
261
262<!--
263 <para>There's a problem with the ISAPI DSO module caused from compiling
264 with <application>GCC</application>-&gcc-version;. If you included the
265 parameter to build the module, comment out the module's load command
266 in the configuration file with the following command:</para>
267
268<screen role="root"><userinput>sed -i "s/^LoadModule isapi_module/# &amp;/" \
269 /etc/apache/httpd.conf</userinput></screen>
270-->
271 </sect3>
272
273 <sect3 id="apache-init">
274 <title>Boot Script</title>
275
276 <para>If you want the <application>Apache</application> server to
277 start automatically when the system is booted, install the
278 <filename>/etc/rc.d/init.d/apache</filename> init script included
279 in the <xref linkend="bootscripts"/> package.</para>
280
281 <indexterm zone="apache apache-init">
282 <primary sortas="f-apache">apache</primary>
283 </indexterm>
284
285<screen role="root"><userinput>make install-apache</userinput></screen>
286
287 </sect3>
288
289 </sect2>
290
291 <sect2 role="content">
292 <title>Contents</title>
293
294 <segmentedlist>
295 <segtitle>Installed Programs</segtitle>
296 <segtitle>Installed Libraries</segtitle>
297 <segtitle>Installed Directories</segtitle>
298
299 <seglistitem>
300 <seg>ab, apachectl, apr-config, apu-config, apxs, checkgid, dbmmanage,
301 htdbm, htdigest, htpasswd, httpd, instdso.sh, logresolve, and
302 rotatelogs</seg>
303 <seg>libapr-1.{so,a}, libaprutil-1.{so,a}, and /usr/lib/apache/*.so</seg>
304 <seg>/etc/apache, /srv/www, /usr/include/apache, /usr/lib/apache, and
305 /var/log/apache</seg>
306 </seglistitem>
307 </segmentedlist>
308
309 <variablelist>
310 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
311 <?dbfo list-presentation="list"?>
312 <?dbhtml list-presentation="table"?>
313
314 <varlistentry id="ab">
315 <term><command>ab</command></term>
316 <listitem>
317 <para>is a tool for benchmarking your
318 <application>Apache</application> HTTP server.</para>
319 <indexterm zone="apache ab">
320 <primary sortas="b-ab">ab</primary>
321 </indexterm>
322 </listitem>
323 </varlistentry>
324
325 <varlistentry id="apachectl">
326 <term><command>apachectl</command></term>
327 <listitem>
328 <para>is a front end to the <application>Apache</application>
329 HTTP server which is designed to help the administrator
330 control the functioning of the <application>Apache</application>
331 httpd daemon.</para>
332 <indexterm zone="apache apachectl">
333 <primary sortas="b-apachectl">apachectl</primary>
334 </indexterm>
335 </listitem>
336 </varlistentry>
337
338 <varlistentry id="apxs">
339 <term><command>apxs</command></term>
340 <listitem>
341 <para>is a tool for building and installing extension modules for
342 the <application>Apache</application> HTTP server.</para>
343 <indexterm zone="apache apxs">
344 <primary sortas="b-apxs">apxs</primary>
345 </indexterm>
346 </listitem>
347 </varlistentry>
348
349 <varlistentry id="dbmmanage">
350 <term><command>dbmmanage</command></term>
351 <listitem>
352 <para>is used to create and update the DBM format files used to store
353 usernames and passwords for basic authentication of HTTP users.</para>
354 <indexterm zone="apache dbmmanage">
355 <primary sortas="b-dbmmanage">dbmmanage</primary>
356 </indexterm>
357 </listitem>
358 </varlistentry>
359
360 <varlistentry id="htdigest">
361 <term><command>htdigest</command></term>
362 <listitem>
363 <para>is used to create and update the flat-files used to store
364 usernames, realms and passwords for digest authentication of
365 HTTP users.</para>
366 <indexterm zone="apache htdigest">
367 <primary sortas="b-htdigest">htdigest</primary>
368 </indexterm>
369 </listitem>
370 </varlistentry>
371
372 <varlistentry id="htpasswd">
373 <term><command>htpasswd</command></term>
374 <listitem>
375 <para>is used to create and update the flat-files used to store
376 usernames and passwords for basic authentication of HTTP users.</para>
377 <indexterm zone="apache htpasswd">
378 <primary sortas="b-htpasswd">htpasswd</primary>
379 </indexterm>
380 </listitem>
381 </varlistentry>
382
383 <varlistentry id="httpd">
384 <term><command>httpd</command></term>
385 <listitem>
386 <para>is the <application>Apache</application>
387 HTTP server program.</para>
388 <indexterm zone="apache httpd">
389 <primary sortas="b-httpd">httpd</primary>
390 </indexterm>
391 </listitem>
392 </varlistentry>
393
394 <varlistentry id="instdso.sh">
395 <term><command>instdso.sh</command></term>
396 <listitem>
397 <para>is a script which installs <application>Apache</application>
398 DSO modules.</para>
399 <indexterm zone="apache instdso.sh">
400 <primary sortas="b-instdso.sh">instdso.sh</primary>
401 </indexterm>
402 </listitem>
403 </varlistentry>
404
405 <varlistentry id="logresolve">
406 <term><command>logresolve</command></term>
407 <listitem>
408 <para>is a post-processing program to resolve IP-addresses
409 in <application>Apache</application>'s access log files.</para>
410 <indexterm zone="apache logresolve">
411 <primary sortas="b-logresolve">logresolve</primary>
412 </indexterm>
413 </listitem>
414 </varlistentry>
415
416 <varlistentry id="rotatelogs">
417 <term><command>rotatelogs</command></term>
418 <listitem>
419 <para>is a simple program for use in conjunction with
420 <application>Apache</application>'s piped log file feature.</para>
421 <indexterm zone="apache rotatelogs">
422 <primary sortas="b-rotatelogs">rotatelogs</primary>
423 </indexterm>
424 </listitem>
425 </varlistentry>
426
427 </variablelist>
428
429 </sect2>
430
431</sect1>
Note: See TracBrowser for help on using the repository browser.