]> granicus.if.org Git - apache/blob - INSTALL
Remove some Makefile.libdir's. These were used by Configure in Apache
[apache] / INSTALL
1
2   APACHE INSTALLATION
3
4   Introduction
5   ============
6
7   Apache 2.0's configuration and installation environment has changed
8   completely from Apache 1.3.  Apache 1.3 used a custom set of scripts
9   to achieve easy installation.  Apache 2.0 now uses libtool and
10   autoconf to create an environment that looks like many other Open
11   Source projects.
12
13
14   Installing the Apache 2.0 HTTP server
15   =====================================
16
17   1. Overview for the impatient
18      --------------------------
19
20      $ ./configure --prefix=PREFIX
21      $ make
22      $ make install
23      $ PREFIX/bin/apachectl start
24
25      NOTE: PREFIX is not the string "PREFIX". Instead use the Unix
26            filesystem path under which Apache should be installed. For
27            instance use "/usr/local/apache" for PREFIX above.
28
29      NOTE: if you are building from a copy of the Apache CVS
30            repository, rather than a release distribution, then you
31            must use the "buildconf" script before running configure.
32
33
34   2. Requirements
35      ------------
36
37      The following requirements exist for building Apache:
38
39      o  Disk Space: 
40
41         Make sure you have approximately 12 MB of temporary free disk
42         space available.  After installation Apache occupies
43         approximately 5 MB of disk space (the actual required disk
44         space depends on the amount of compiled in third party
45         modules, etc).
46
47      o  ANSI-C Compiler: 
48
49         Make sure you have an ANSI-C compiler installed. The GNU C
50         compiler (GCC) from the Free Software Foundation (FSF) is
51         recommended (version 2.7.2 is fine). If you don't have GCC
52         then at least make sure your vendors compiler is ANSI
53         compliant. You can find the homepage of GNU at
54         http://www.gnu.org/ and the GCC distribution under
55         http://www.gnu.org/order/ftp.html .
56
57      o  Perl 5 Interpreter [OPTIONAL]:
58
59         For some of the support scripts like `apxs' or `dbmmanage'
60         (which are written in Perl) the Perl 5 interpreter is required
61         (versions 5.003 and 5.004 are fine). If no such interpreter is
62         found by the `configure' script this is no harm.  Of
63         course, you still can build and install Apache 2.0. Only those
64         support scripts cannot be used. If you have multiple Perl
65         interpreters installed (perhaps a Perl 4 from the vendor and a
66         Perl 5 from your own), then it is recommended to use the
67         --with-perl option (see below) to make sure the correct one is
68         selected by ./configure.
69
70      o  Dynamic Shared Object (DSO) support [OPTIONAL]:
71
72         To provide maximum flexibility Apache now is able to load
73         modules under runtime via the DSO mechanism by using the
74         pragmatic dlopen()/dlsym() system calls. These system calls
75         are not available under all operating systems therefore you
76         cannot use the DSO mechanism on all platforms. And Apache
77         currently has only limited built-in knowledge on how to
78         compile shared objects because this is heavily
79         platform-dependent. The current state is this:
80
81         o Out-of-the-box supported platforms are (Not all of these
82           will work currently.  DSO support is currently available on
83           most of these platforms however):
84            - Linux     - SunOS         - UnixWare     - Darwin/Mac OS
85            - FreeBSD   - Solaris       - AIX          - OpenStep/Mach
86            - OpenBSD   - IRIX          - SCO          - DYNIX/ptx
87            - NetBSD    - HPUX          - ReliantUNIX
88            - BSDI      - Digital Unix  - DGUX
89
90         o Entirely unsupported platforms are:
91            - Ultrix
92
93         If your system is not on these lists but has the dlopen-style
94         interface, you either have to provide the appropriate compiler
95         and linker flags (see CFLAGS_SHLIB, LDFLAGS_SHLIB and
96         LDFLAGS_SHLIB_EXPORT below) manually or at least make sure a
97         Perl 5 interpreter is installed from which Apache can guess
98         the options.
99
100
101      If you are building from a copy of the CVS repository, rather
102      than a release distribution, then you will need these additional
103      tools:
104
105      o  Libtool 1.3.3:
106
107         Make sure that you have libtool 1.3.3 or later installed
108         before trying to configure and build Apache 2.0.  Libtool can
109         be downloaded from the Free Software Foundation (FSF), at
110         http://www.gnu.org/order/ftp.html.
111
112      o  Autoconf 2.13:
113
114         Make sure that you have autoconf 2.13 or later installed
115         before trying to configure and build Apache 2.0.  Autoconf can
116         be downloaded from the Free Software Foundation (FSF), at
117         http://www.gnu.org/order/ftp.html.
118
119
120   3. Configuring the source tree
121      ---------------------------
122
123      Setup:
124
125      If you have downloading the Apache 2.0 from the CVS, rather than
126      a release distribution, then you will need to prepare the source
127      tree for configuration and compilation. This is done by running:
128  
129      ./buildconf
130
131      This script ensures that all required programs are installed on
132      the currently machine, and creates the ./configure script.  If
133      you are using a package downloaded from apache.org then this step
134      is not necessary.
135
136      Introduction:
137
138      The next step is to configure the Apache source tree for your
139      particular platform and personal requirements. The most important
140      setup here is the location prefix where Apache is to be installed
141      later, because Apache has to be configured for this location to
142      work correctly. But there are a lot of other options available
143      for your pleasure.
144
145      For a short impression of what possibilities you have, here is a
146      typical example which compiles Apache for the installation tree
147      /sw/pkg/apache with a particular compiler and flags plus the two
148      additional modules mod_rewrite and mod_speling for later loading
149      through the DSO mechanism:
150
151      $ CC="pgcc" OPTIM="-O2" \
152        ./configure --prefix=/sw/pkg/apache \
153                    --enable-rewrite=shared \
154                    --enable-speling=shared
155
156      The easiest way to find all of the configuration flags for Apache
157      2.0 is to run ./configure --help.  What follows is a brief
158      description of most of the arguments.
159
160      Reference:
161
162      $ [CC=...]        [CFLAGS_SHLIB=...]           [TARGET=...]
163        [OPTIM=...]     [LD_SHLIB=...]
164        [CFLAGS=...]    [LDFLAGS_SHLIB=...]        
165        [INCLUDES=...]  [LDFLAGS_SHLIB_EXPORT=...] 
166        [LDFLAGS=...]   [RANLIB=...]  
167        [LIBS=...]      [DEPS=...]
168        [NOTEST_CFLAGS=...]
169        [NOTEST_LDFLAGS=...]
170        ./configure
171            [--quiet]         [--prefix=DIR]            [--enable-NAME=(shared)]
172            [--verbose]       [--exec-prefix=PREFIX]    [--disable-NAME]
173            [--shadow[=DIR]]  [--bindir=EPREFIX]        [--with-mpm=NAME]
174            [--show-layout]   [--sbindir=DIR]           
175            [--help]          [--libexecdir=DIR]        
176                              [--mandir=DIR]            
177                              [--sysconfdir=DIR]        
178                              [--datadir=DIR]           
179                              [--includedir=DIR]        
180                              [--localstatedir=DIR]
181                              [--runtimedir=DIR]        [--enable-suexec]
182                              [--logfiledir=DIR]        [--suexec-caller=UID]
183                              [--proxycachedir=DIR]     [--suexec-docroot=DIR]
184                              [--with-layout=[FILE:]ID] [--suexec-logfile=FILE]
185                                                        [--suexec-userdir=DIR]
186                              [--with-perl=FILE]        [--suexec-uidmin=UID]
187                              [--without-support]       [--suexec-gidmin=GID]
188                              [--without-confadjust]    [--suexec-safepath=PATH]
189                              [--without-execstrip]
190                              [--server-uid=UID]        [--with-maintainter-mode]
191                              [--server-gid=GID]
192
193      Use the CC, OPTIM, CFLAGS, INCLUDES, LDFLAGS, LIBS, CFLAGS_SHLIB,
194      LD_SHLIB, LDFLAGS_SHLIB, LDFLAGS_SHLIB_EXPORT, RANLIB, DEPS and
195      TARGET environment variables to override and expand the corresponding
196      default entries as determined by configure. Use NOTEST_CFLAGS
197      and NOTEST_LDFLAGS to add entries that should be used only during
198      the actual build and compilation of Apache, such as -Werror.
199
200      Use the --prefix=PREFIX and --exec-prefix=EPREFIX options to
201      configure Apache to use a particular installation prefix. The
202      default is PREFIX=/usr/local/apache and EPREFIX=PREFIX.
203
204      Use the --bindir=DIR, --sbindir=DIR, --libexecdir=DIR,
205      --mandir=DIR, --sysconfdir=DIR, --datadir=DIR, --iconsdir=DIR,
206      --htdocsdir=DIR, --cgidir=DIR, --includedir=DIR,
207      --localstatedir=DIR, --runtimedir=DIR, --logfiledir=DIR and
208      --proxycachedir=DIR option to change the paths for particular
209      subdirectories of the installation tree.  Defaults are
210      bindir=EPREFIX/bin, sbindir=EPREFIX/bin,
211      libexecdir=EPREFIX/modules, mandir=PREFIX/man,
212      sysconfdir=PREFIX/conf, datadir=PREFIX, iconsdir=PREFIX/icons,
213      htdocsdir=PREFIX/htdocs, cgidir=PREFIX/cgi-bin,
214      includedir=PREFIX/include, localstatedir=PREFIX,
215      runtimedir=PREFIX/logs, logfiledir=PREFIX/logs and
216      proxycachedir=PREFIX/proxy.
217
218          Note: To reduce the pollution of shared installation
219                locations (like /usr/local/ or /etc) with Apache files
220                to a minimum the string ``/apache'' is automatically
221                appended to 'libexecdir', 'sysconfdir', 'datadir',
222                'localstatedir' and 'includedir' if (and only if) the
223                following points apply for each path individually:
224
225                    1. the path doesn't already contain the word ``apache''
226                    2. the path was not directly customized by the user
227
228                Keep in mind that per default these paths are derived
229                from 'prefix' and 'exec-prefix', so usually its only a
230                matter whether these paths contain ``apache'' or
231                not. Although the defaults were defined with experience
232                in mind you always should make sure the paths fit your
233                situation by checking the finally chosen paths via the
234                --layout option.
235
236      Use the --with-layout=[F:]ID option to select a particular
237      installation path base-layout. You always _HAVE_ to select a
238      base-layout. There are currently two layouts pre-defined in the
239      file config.layout: `Apache' for the classical Apache path layout
240      and `GNU' for a path layout conforming to the GNU `standards'
241      document. When you want to use your own custom layout FOO, either
242      add a corresponding "<Layout FOO>...</Layout>" section to
243      config.layout and use --with-layout=FOO or place it into your own
244      file, say config.mypaths, and use
245      --with-layout=config.mypaths:FOO.
246  
247      Use the --show-layout option to check the final installation path
248      layout while fiddling with the options above.
249  
250      Use the --enable-NAME=(shared) and --disable-NAME options to
251      enable or disable a particular already distributed module from
252      the Apache package.
253
254      Use the --with-mpm=NAME option to determine which MPM should be
255      built for your server.
256
257      _________________________________________________________________________
258      LIST OF AVAILABLE MODULES
259
260      Environment creation
261       (+) mod_env .......... Set environment variables for CGI/SSI scripts
262       (+) mod_setenvif ..... Set environment variables based on HTTP headers
263       (-) mod_unique_id .... Generate unique identifiers for request
264
265      Content type decisions
266       (+) mod_mime ......... Content type/encoding determination (configured)
267       (-) mod_mime_magic ... Content type/encoding determination (automatic)
268       (+) mod_negotiation .. Content selection based on the HTTP Accept* headers
269
270      URL mapping
271       (+) mod_alias ........ Simple   URL translation and redirection
272       (-) mod_rewrite ...... Advanced URL translation and redirection
273       (+) mod_userdir ...... Selection of resource directories by username
274       (-) mod_speling ...... Correction of misspelled URLs
275
276      Directory Handling
277       (+) mod_dir .......... Directory and directory default file handling
278       (+) mod_autoindex .... Automated directory index file generation
279
280      Access Control and Authentication
281       (+) mod_access ....... Access Control (user, host, network)
282       (+) mod_auth ......... HTTP Basic Authentication (user, passwd)
283       (-) mod_auth_dbm ..... HTTP Basic Authentication via Unix NDBM files
284       (-) mod_auth_db ...... HTTP Basic Authentication via Berkeley-DB files
285       (-) mod_auth_anon .... HTTP Basic Authentication for Anonymous-style users
286       (-) mod_digest ....... HTTP Digest Authentication
287
288      HTTP response
289       (-) mod_headers ...... Arbitrary HTTP response headers (configured)
290       (-) mod_cern_meta .... Arbitrary HTTP response headers (CERN-style files)
291       (-) mod_expires ...... Expires HTTP responses 
292       (+) mod_asis ......... Raw HTTP responses 
293
294      Scripting
295       (+) mod_include ...... Server Side Includes (SSI) support
296       (+) mod_cgi .......... Common Gateway Interface (CGI) support
297       (+) mod_cgid ......... Common Gateway Interface (CGI) support for 
298                              multi-threaded MPMs
299       (+) mod_actions ...... Map CGI scripts to act as internal `handlers'
300
301      Internal Content Handlers
302       (+) mod_status ....... Content handler for server run-time status
303       (-) mod_info ......... Content handler for server configuration summary
304
305      Request Logging
306       (+) mod_log_config ... Customizable logging of requests
307       (-) mod_usertrack .... Logging of user click-trails via HTTP Cookies
308
309      Content Management
310       (-) mod_dav .......... WebDAV (RFC 2518) support for Apache
311       (-) mod_dav_fs ....... mod_dav backend to managing filesystem content
312
313      Miscellaneous
314       (+) mod_imap ......... Server-side Image Map support
315       (-) mod_proxy ........ Caching Proxy Module (HTTP, HTTPS, FTP)
316       (-) mod_so ........... Dynamic Shared Object (DSO) bootstrapping
317
318      Experimental
319       (-) mod_mmap_static .. Caching of frequently served pages via mmap()
320
321      Development
322       (-) mod_example ...... Apache API demonstration (developers only)
323
324      MPMs
325           mpmt_pthread ..... Multi-process(dynamic) Multi-threaded(static) 
326                              Unix MPM
327           prefork .......... Preforking Unix MPM
328           perchild ......... Multi-process(static) Multi-threaded(dynamic)
329                              Unix MPM, that allows a User per child process
330
331           winnt ............ Multi-process(1) Multi-threaded Windows MPM
332
333           mpmt_beos ........ Multi-process Multi-threaded Beos MPM
334           beos ............. Multi-process Multi-threaded Beos MPM
335
336           spmt_os2 ......... Single-process Multi-threaded OS/2 MPM
337      _________________________________________________________________________
338                     (+) = enabled  per default [disable with --disable-module]
339                     (-) = disabled per default [enable  with --enable-module ]
340
341      Use the --enable-suexec option to enable the suEXEC feature by
342      building and installing the "suexec" support program.
343
344      CAUTION: FOR DETAILS ABOUT THE SUEXEC FEATURE WE HIGHLY RECOMMEND
345               YOU TO FIRST READ THE DOCUMENT htdocs/manual/suexec.html
346               BEFORE USING THE ABOVE OPTIONS.
347      
348               USING THE SUEXEC FEATURE PROPERLY CAN REDUCE
349               CONSIDERABLY THE SECURITY RISKS INVOLVED WITH ALLOWING
350               USERS TO DEVELOP AND RUN PRIVATE CGI OR SSI
351               PROGRAMS. HOWEVER, IF SUEXEC IS IMPROPERLY CONFIGURED,
352               IT CAN CAUSE ANY NUMBER OF PROBLEMS AND POSSIBLY CREATE
353               NEW HOLES IN YOUR COMPUTER'S SECURITY.  IF YOU AREN'T
354               FAMILIAR WITH MANAGING SETUID ROOT PROGRAMS AND THE
355               SECURITY ISSUES THEY PRESENT, WE HIGHLY RECOMMEND THAT
356               YOU NOT CONSIDER USING SUEXEC AND KEEP AWAY FROM THESE
357               OPTIONS!
358
359      Use the --quiet option to disable all configuration verbose
360      messages.
361  
362
363   4. Building the package
364      --------------------
365      
366      Now you can build the various parts which form the Apache package
367      by simply running the command:
368  
369         $ make 
370  
371      Please be patient here, this takes approximately 2 minutes to
372      complete under a Pentium-166/FreeBSD-2.2 system, dependend on the
373      amount of modules you have enabled.
374
375  
376   5. Installing the package
377      ----------------------
378      
379      Now its time to install the package under the configured
380      installation PREFIX (see --prefix option above) by running:
381  
382         $ make install
383  
384      For the paranoid hackers under us: The above command really
385      installs under prefix _only_, i.e. no other stuff from your
386      system is touched. Even if you upgrade an existing installation
387      your configuration files in PREFIX/conf/ are preserved.
388
389
390   6. Testing the package
391      -------------------
392  
393      Now you can fire up your Apache HTTP server by immediately
394      running:
395  
396         $ PREFIX/bin/apachectl start
397  
398      and then you should be able to request your first document via
399      URL http://localhost/ (when you built and installed Apache as
400      root or at least used the --without-confadjust option) or
401      http://localhost:8080/ (when you built and installed Apache as a
402      regular user). Then stop the server again by running:
403
404         $ PREFIX/bin/apachectl stop
405
406  
407   7. Customizing the package
408      -----------------------
409  
410      Finally you can customize your Apache HTTP server by editing the
411      configuration files under PREFIX/conf/.
412  
413         $ vi PREFIX/conf/httpd.conf
414  
415      Have a look at the Apache manual under docs/manual/ or
416      http://httpd.apache.org/docs/ for a complete reference of
417      available configuration directives.
418
419
420   8. Preparing the system
421      --------------------
422
423      Proper operation of a public HTTP server requires at least the
424      following:
425
426      1. A correctly working TCP/IP layer, since HTTP is implemented on
427         top of TCP/IP. Although modern Unix platforms have good
428         networking layers, always make sure you have all official
429         vendor patches referring to the network layer applied.
430
431      2. Accurate time keeping, since elements of the HTTP protocol are
432         expressed as the time of day.  So, it's time to investigate
433         setting some time synchronization facility on your
434         system. Usually the ntpdate or xntpd programs are used for
435         this purpose which are based on the Network Time Protocol
436         (NTP). See the Usenet newsgroup comp.protocols.time.ntp and
437         the NTP homepage at http://www.eecis.udel.edu/~ntp/ for more
438         details about NTP software and public time servers.
439
440
441   9. Contacts
442      --------
443
444      o If you want to be informed about new code releases, bug fixes,
445        security fixes, general news and information about the Apache
446        server subscribe to the apache-announce mailing list as
447        described under http://httpd.apache.org/announcelist.html
448
449      o If you want freely available support for running Apache please
450        join the Apache user community by subscribing at least to the
451        following USENET newsgroup: comp.infosystems.www.servers.unix
452
453      o If you want commercial support for running Apache please
454        contact one of the companies and contractors which are listed
455        at http://httpd.apache.org/info/support.cgi
456
457      o If you have a concrete bug report for Apache please go to the
458        Apache Group Bug Database and submit your report:
459        http://httpd.apache.org/bug_report.html
460
461      o If you want to participate in actively developing Apache please
462        subscribe to the `new-httpd' mailing list as described at
463        http://www.apache.org/foundation/mailinglists.html
464
465      Thanks for running Apache.
466
467                                           The Apache Group
468                                           http://www.apache.org/