source: server/major/apache.xml@ d551456

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 d551456 was d551456, checked in by Andrew Benton <andy@…>, 12 years ago

apr-util-1.4.1

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

  • Property mode set to 100644
File size: 19.5 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 "1696ae62cd879ab1d4dd9ff021a470f2">
11 <!ENTITY apache-size "6.8 MB">
12 <!ENTITY apache-buildsize "105 MB (building all available DSO modules)">
13 <!ENTITY apache-time "1.2 SBU (building all available DSO modules)">
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 &lfs70_checked;
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>Download (HTTP): <ulink url="&apache-download-http;"/></para>
43 </listitem>
44 <listitem>
45 <para>Download (FTP): <ulink url="&apache-download-ftp;"/></para>
46 </listitem>
47 <listitem>
48 <para>Download MD5 sum: &apache-md5sum;</para>
49 </listitem>
50 <listitem>
51 <para>Download size: &apache-size;</para>
52 </listitem>
53 <listitem>
54 <para>Estimated disk space required: &apache-buildsize;</para>
55 </listitem>
56 <listitem>
57 <para>Estimated build time: &apache-time;</para>
58 </listitem>
59 </itemizedlist>
60
61 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
62 <itemizedlist spacing='compact'>
63 <listitem>
64 <para>Required patch: <ulink
65 url="&patch-root;/httpd-&apache-version;-config-1.patch"/></para>
66 </listitem>
67 <listitem>
68 <para>Required patch: <ulink
69 url="&patch-root;/httpd-&apache-version;-pcre-8.30-1.patch"/></para>
70 </listitem>
71 </itemizedlist>
72
73 <bridgehead renderas="sect3">Apache Dependencies</bridgehead>
74
75 <bridgehead renderas="sect4">Optional</bridgehead>
76 <para role="optional"><xref linkend="openldap"/>,
77 <xref linkend="openssl"/> (also used in the bundled APR-util),
78 <xref linkend="pcre"/>,
79 <xref linkend="rsync"/>,
80 <xref linkend="lynx"/>,
81 <ulink url="http://apr.apache.org/">APR</ulink>,
82 <ulink url="http://apr.apache.org/">APR-util</ulink>, and
83 <ulink url="http://www.distcache.org/">distcache</ulink></para>
84
85 <bridgehead renderas="sect4">Optional (Only if Using the Bundled
86 APR-util)</bridgehead>
87 <para role="optional"><!-- <xref linkend="pkgconfig"/>, -->
88 <xref linkend="expat"/>,
89 <!-- <xref linkend="gdbm"/>, -->
90 <xref linkend="db"/>,
91 <xref linkend="unixodbc"/>,
92 <xref linkend="mysql"/>,
93 <xref linkend="postgresql"/>,
94 <xref linkend="sqlite"/>,
95 <ulink url="http://www.oracle.com/us/products/database/index.html">Oracle 11g</ulink>, and
96 <ulink url="http://www.freetds.org/">FreeTDS</ulink></para>
97
98 <para>Though you can install APR and APR-util as separate components, the
99 bundled versions that come with the Apache HTTPD tarball are
100 recommended.</para>
101
102 <para condition="html" role="usernotes">User Notes:
103 <ulink url="&blfs-wiki;/apache"/></para>
104
105 </sect2>
106
107 <sect2 role="installation">
108 <title>Installation of Apache</title>
109
110 <para>For security reasons, running the server as an unprivileged user and
111 group is strongly encouraged. Create the following group and user using the
112 following commands
113 (as <systemitem class="username">root</systemitem>):</para>
114
115<screen role="root"><userinput>groupadd -g 25 apache &amp;&amp;
116useradd -c "Apache Server" -d /dev/null -g apache \
117 -s /bin/false -u 25 apache</userinput></screen>
118
119 <note><para>The above command directs the <application>Apache</application>
120 user's home directory to <filename>/dev/null</filename>. This may not work
121 for some add-ons such as <ulink
122 url='http://www.viewvc.org/'><application>ViewVC</application></ulink>, a
123 browser interface for CVS and Subversion version control repositories.
124 See the User Notes for details for specific applications.</para></note>
125
126 <para>The following patch modifies the layout of destination
127 directories and among them, the build directory at
128 <filename class="directory">/usr/lib/apache/build</filename>. This
129 will allow the modules added to <application>Apache</application>
130 to be configured without errors. Apply the patch:</para>
131
132<screen><userinput>patch -p1 &lt; ../httpd-&apache-version;-pcre-8.30-1.patch &amp;&amp;
133patch -Np1 -i ../httpd-&apache-version;-config-1.patch</userinput></screen>
134
135 <note>
136 <para>You may wish to review the output from
137 <command>./configure --help</command> and include whatever parameters
138 are necessary to the <command>configure</command> command below to build
139 the modules required for your installation. There are as many as 65
140 additional parameters you can add to the <command>configure</command>
141 command to build additional modules. Some of the extra parameters which
142 aren't described or mentioned in the <parameter>--help</parameter>
143 information are listed in the <quote>Command Explanations</quote> section
144 below.</para>
145
146 <para>If you are using the bundled version of
147 <application>APR-util</application> and you are going to install
148 <application>Subversion</application> with
149 <application>Berkeley DB</application> back-end support, ensure you use
150 the parameters shown in the <quote>Command Explanations</quote> section
151 below.</para>
152
153 <para>While it is not built by default when using the following commands,
154 the ISAPI DSO module can be created by adding the
155 <option>--enable-isapi</option> option. Even though the module will
156 compile, install and load fine, the module is
157 <emphasis>only</emphasis> supported and functional in Win32
158 environments.</para>
159 </note>
160
161 <para>Build and install <application>Apache</application> by running the
162 following commands:</para>
163
164<screen><userinput>./configure --enable-layout=FHS \
165 --enable-mods-shared=all \
166 --enable-so &amp;&amp;
167make</userinput></screen>
168
169 <para>This package does not come with a test suite.</para>
170
171 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
172
173<screen role="root"><userinput>make install &amp;&amp;
174chown -v root:root /usr/lib/apache/httpd.exp \
175 /usr/sbin/{apxs,apachectl,dbmmanage,envvars{,-std}} \
176 /usr/share/man/man1/{dbmmanage,ht{dbm,digest,passwd}}.1 \
177 /usr/share/man/man8/{ab,apachectl,apxs,htcacheclean,httpd}.8 \
178 /usr/share/man/man8/{logresolve,rotatelogs,suexec}.8 &amp;&amp;
179chown -v -R apache:apache /srv/www</userinput></screen>
180
181 </sect2>
182
183 <sect2 role="commands">
184 <title>Command Explanations</title>
185
186 <para><parameter>--enable-mods-shared=all</parameter>: The modules
187 should be compiled and used as Dynamic Shared Objects
188 (DSOs) so they can be included and excluded from the
189 server using the run-time configuration directives.</para>
190
191 <para><option>--enable-ssl</option>: Use this parameter
192 to create the <filename class="libraryfile">mod_ssl</filename>
193 module and enable SSL support. This parameter is mentioned as one of many
194 parameters which can be passed to the <command>configure</command> command
195 to create additional DSO modules.<!-- Note that it really only affects the
196 APR-Util sub-package, which the HTTPD installation then uses.--></para>
197
198 <para><option>--with-pcre</option>: Add this parameter to use the system
199 installed version of the <application>PCRE</application> library.</para>
200
201 <para><option>--with-z</option>: Add this parameter to use the system
202 installed version of the <application>Zlib</application> library.</para>
203
204 <para><option>--with-ldap</option>: This parameter is required if you
205 passed the <option>--enable-authnz-ldap</option> or
206 <option>--enable-ldap</option> options to <command>configure</command>
207 and enabled the <application>OpenLDAP</application> modules.</para>
208
209 <para><option>--with-dbm=db4 --with-berkeley-db</option>: Use these
210 parameters if you require <application>Berkeley DB</application> support in
211 the bundled version of <application>APR-util</application> (required for
212 <application>Berkeley DB</application> back-end support in
213 <application>Subversion</application>). If you are using
214 <application>Berkeley DB</application>-5.1, change the first parameter to
215 <option>--with-dbm=db51</option>.</para>
216
217 <para><option>--with-mysql</option>: Add this parameter to use the system
218 installed version of <application>MySQL</application>.</para>
219
220 <para><option>--with-included-apr</option>: Add this parameter to use the
221 bundled version of the APR system. The default is to use a
222 system-installed version, if one if available. Use this parameter to force
223 the build to use and then install (overwriting the existing APR) the
224 internal (bundled) copy of the APR.</para>
225
226 <para><command>chown root:root ...</command>: This command changes the
227 ownership of some installed files, the result of building the package as
228 a user other than <systemitem class="username">root</systemitem>.</para>
229
230 <para><command>chown -R apache:apache /srv/www</command>: By default, the
231 installation process installs files (documentation, error messages, default
232 icons, etc.) with the ownership of the user that extracted the files from
233 the tar file. If you want to change the ownership to another user, you
234 should do so at this point. The only requirement is that the document
235 directories need to be accessible by the <command>httpd</command> process
236 with (r-x) permissions and files need to be readable (r--) by the
237 <systemitem class="username">apache</systemitem> user.</para>
238
239 </sect2>
240
241 <sect2 role="configuration">
242 <title>Configuring Apache</title>
243
244 <sect3 id="apache-config">
245 <title>Config Files</title>
246
247 <para><filename>/etc/apache/*</filename></para>
248
249 <indexterm zone="apache apache-config">
250 <primary sortas="e-etc-apache">/etc/apache/*</primary>
251 </indexterm>
252
253 <indexterm zone="apache apache-config">
254 <primary sortas="e-etc-apache-httpd.conf">/etc/apache/httpd.conf</primary>
255 </indexterm>
256
257 </sect3>
258
259 <sect3>
260 <title>Configuration Information</title>
261
262 <para>The main configuration file is named
263 <filename>/etc/apache/httpd.conf</filename>. Modify it so that the HTTP
264 server runs as the dedicated user and group:</para>
265
266<screen role="root"><userinput>sed -i -e "s/User daemon/User apache/" \
267 -e "s/Group daemon/Group apache/" \
268 /etc/apache/httpd.conf</userinput></screen>
269
270 <para>See <ulink url="http://httpd.apache.org/docs-2.2/configuring.html"/>
271 for detailed instructions on customizing your
272 <application>Apache</application> HTTP server configuration file.</para>
273
274 </sect3>
275
276 <sect3 id="httpd-init">
277 <title>Boot Script</title>
278
279 <para>If you want the <application>Apache</application> server to
280 start automatically when the system is booted, install the
281 <filename>/etc/rc.d/init.d/httpd</filename> init script included
282 in the <xref linkend="bootscripts"/> package.</para>
283
284 <indexterm zone="apache httpd-init">
285 <primary sortas="f-apache">apache</primary>
286 </indexterm>
287
288<screen role="root"><userinput>make install-httpd</userinput></screen>
289
290 </sect3>
291
292 </sect2>
293
294 <sect2 role="content">
295 <title>Contents</title>
296
297 <segmentedlist>
298 <segtitle>Installed Programs</segtitle>
299 <segtitle>Installed Libraries</segtitle>
300 <segtitle>Installed Directories</segtitle>
301
302 <seglistitem>
303 <seg>ab, apachectl, apr-1-config, apu-1-config, apxs, checkgid,
304 dbmmanage, htcacheclean, htdbm, htdigest, htpasswd, httpd, httxt2dbm,
305 logresolve, rotatelogs, and suexec</seg>
306 <seg>libapr-1.{so,a}, libaprutil-1.{so,a}, apr_{dbd,ldap} database
307 modules, and numerous DSO modules</seg>
308 <seg>/etc/apache, /srv/www, /usr/include/apache, /usr/lib/apache,
309 /usr/lib/apr-util-1, and /var/log/apache</seg>
310 </seglistitem>
311 </segmentedlist>
312
313 <variablelist>
314 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
315 <?dbfo list-presentation="list"?>
316 <?dbhtml list-presentation="table"?>
317
318 <varlistentry id="ab">
319 <term><command>ab</command></term>
320 <listitem>
321 <para>is a tool for benchmarking your
322 <application>Apache</application> HTTP server.</para>
323 <indexterm zone="apache ab">
324 <primary sortas="b-ab">ab</primary>
325 </indexterm>
326 </listitem>
327 </varlistentry>
328
329 <varlistentry id="apachectl">
330 <term><command>apachectl</command></term>
331 <listitem>
332 <para>is a front end to the <application>Apache</application>
333 HTTP server which is designed to help the administrator
334 control the functioning of the <application>Apache</application>
335 httpd daemon.</para>
336 <indexterm zone="apache apachectl">
337 <primary sortas="b-apachectl">apachectl</primary>
338 </indexterm>
339 </listitem>
340 </varlistentry>
341
342<!--
343 <varlistentry id="apr-1-config">
344 <term><command>apr-1-config</command></term>
345 <listitem>
346 <para>is a simple script that provides information about the
347 installed APR program.</para>
348 <indexterm zone="apache apr-1-config">
349 <primary sortas="b-apr-1-config">apr-1-config</primary>
350 </indexterm>
351 </listitem>
352 </varlistentry>
353
354 <varlistentry id="apu-1-config">
355 <term><command>apu-1-config</command></term>
356 <listitem>
357 <para>is a simple script that provides information about the
358 installed APR-Util program.</para>
359 <indexterm zone="apache apu-1-config">
360 <primary sortas="b-apu-1-config">apu-1-config</primary>
361 </indexterm>
362 </listitem>
363 </varlistentry>
364-->
365
366 <varlistentry id="apxs">
367 <term><command>apxs</command></term>
368 <listitem>
369 <para>is a tool for building and installing extension modules for
370 the <application>Apache</application> HTTP server.</para>
371 <indexterm zone="apache apxs">
372 <primary sortas="b-apxs">apxs</primary>
373 </indexterm>
374 </listitem>
375 </varlistentry>
376
377 <varlistentry id="checkgid">
378 <term><command>checkgid</command></term>
379 <listitem>
380 <para>is a program that checks whether it can setgid to the group
381 specified. This is to see if it is a valid group for Apache2 to use
382 at runtime. If the user (should be run as superuser) is in that
383 group, or can setgid to it, it will return 0.</para>
384 <indexterm zone="apache checkgid">
385 <primary sortas="b-checkgid">checkgid</primary>
386 </indexterm>
387 </listitem>
388 </varlistentry>
389
390 <varlistentry id="dbmmanage">
391 <term><command>dbmmanage</command></term>
392 <listitem>
393 <para>is used to create and update the DBM format files used to store
394 usernames and passwords for basic authentication of HTTP users.</para>
395 <indexterm zone="apache dbmmanage">
396 <primary sortas="b-dbmmanage">dbmmanage</primary>
397 </indexterm>
398 </listitem>
399 </varlistentry>
400
401 <varlistentry id="htcacheclean">
402 <term><command>htcacheclean</command></term>
403 <listitem>
404 <para>is used to clean up the disk cache.</para>
405 <indexterm zone="apache htcacheclean">
406 <primary sortas="b-htcacheclean">htcacheclean</primary>
407 </indexterm>
408 </listitem>
409 </varlistentry>
410
411 <varlistentry id="htdbm">
412 <term><command>htdbm</command></term>
413 <listitem>
414 <para>is used to manipulate the DBM password databases.</para>
415 <indexterm zone="apache htdbm">
416 <primary sortas="b-htdbm">htdbm</primary>
417 </indexterm>
418 </listitem>
419 </varlistentry>
420
421 <varlistentry id="htdigest">
422 <term><command>htdigest</command></term>
423 <listitem>
424 <para>is used to create and update the flat-files used to store
425 usernames, realms and passwords for digest authentication of
426 HTTP users.</para>
427 <indexterm zone="apache htdigest">
428 <primary sortas="b-htdigest">htdigest</primary>
429 </indexterm>
430 </listitem>
431 </varlistentry>
432
433 <varlistentry id="htpasswd">
434 <term><command>htpasswd</command></term>
435 <listitem>
436 <para>is used to create and update the flat-files used to store
437 usernames and passwords for basic authentication of HTTP users.</para>
438 <indexterm zone="apache htpasswd">
439 <primary sortas="b-htpasswd">htpasswd</primary>
440 </indexterm>
441 </listitem>
442 </varlistentry>
443
444 <varlistentry id="httpd">
445 <term><command>httpd</command></term>
446 <listitem>
447 <para>is the <application>Apache</application>
448 HTTP server program.</para>
449 <indexterm zone="apache httpd">
450 <primary sortas="b-httpd">httpd</primary>
451 </indexterm>
452 </listitem>
453 </varlistentry>
454
455 <varlistentry id="httxt2dbm">
456 <term><command>httxt2dbm</command></term>
457 <listitem>
458 <para>is used to generate DBM files from text input, for use in
459 RewriteMap.</para>
460 <indexterm zone="apache httxt2dbm">
461 <primary sortas="b-httxt2dbm">httxt2dbm</primary>
462 </indexterm>
463 </listitem>
464 </varlistentry>
465
466 <varlistentry id="logresolve">
467 <term><command>logresolve</command></term>
468 <listitem>
469 <para>is a post-processing program to resolve IP-addresses
470 in <application>Apache</application>'s access log files.</para>
471 <indexterm zone="apache logresolve">
472 <primary sortas="b-logresolve">logresolve</primary>
473 </indexterm>
474 </listitem>
475 </varlistentry>
476
477 <varlistentry id="rotatelogs">
478 <term><command>rotatelogs</command></term>
479 <listitem>
480 <para>is a simple program for use in conjunction with
481 <application>Apache</application>'s piped log file feature.</para>
482 <indexterm zone="apache rotatelogs">
483 <primary sortas="b-rotatelogs">rotatelogs</primary>
484 </indexterm>
485 </listitem>
486 </varlistentry>
487
488 <varlistentry id="suexec">
489 <term><command>suexec</command></term>
490 <listitem>
491 <para>is used by the <application>Apache HTTP</application> Server
492 to switch to another user before executing CGI programs.</para>
493 <indexterm zone="apache suexec">
494 <primary sortas="b-suexec">suexec</primary>
495 </indexterm>
496 </listitem>
497 </varlistentry>
498
499 </variablelist>
500
501 </sect2>
502
503</sect1>
Note: See TracBrowser for help on using the repository browser.