1.4. Building Apache from the Sources
Problem
You want to build your Apache Web server from the sources directly rather than installing it from a prepackaged kit.
Solution
Assuming that you already have the Apache source tree—whether you installed it from a tarball, Subversion, or some distribution package, the following commands—executed in the top directory of the tree, builds the server package with most of the standard modules as DSOs:
%./buildconf%./configure --prefix=/usr/local/apache>--with-layout=Apache --enable-modules=most --enable-mods-shared=all \>--with-mpm=prefork%make#make install
If you want more detailed information about the various options and their meanings, you can use the following command:
% ./configure --helpDiscussion
Building the server from the sources can be complex and time-consuming, but it’s essential if you intend to make any changes to the source code. It gives you much more control over things, such as the use of shareable object libraries and the database routines available to modules. Building from source is also de rigeur if you’re developing your own Apache modules.
If you want to build the modules statically into the server,
replace any occurrences of
--enable-mods-shared=
with
list--enable-mods=.list
The options to the configure script are many and varied; if you haven’t used it before to build Apache, locate some online tutorials (such as those at http://apache-server.com/tutorials/ or http://httpd.apache.org/docs-2.0/install.html) when ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access