Building Apache with many modules > Strategy
Previous Page Contents Next Page
OOP-Reserch home page

Mail to Me

Strategy

Any questions and comments are welcome to me.

1: The required modules

Building Apache1.3.12 itself easy. After extracted the source distribution, just

	cd 
	./configure
	make
	make install
will be OK. For details about installation of Apache, please read http://www.apache.org/docs/install.html
But in case many modules need to be compiled with Apache, it is important to take the appropriate procedure. Except for the standard modules which are supplied with Apache source tree, we should carefully examine how to compile them. In this documentation, I'll describe the step by step procedure for building Apache1.3.12 with the following modules:

2: The standard modules

As for the standard modules, giving the '--enable-module=NAME' and '--enable-shared=NAME' options to './configure' will be enough. For example,

    --enable-module=vhost_alias \
    --enable-shared=vhost_alias \
will compile 'mod_vhost_alias.so' as the shared library. Note that the values passed to these options are different than the names of modules themselves. For most standard modules, the appropriate name is the substring from the module name, so this does not matter. But there is exception like 'libproxy' and 'proxy', so I prepared the simple shell (which uses 'awk') script to generate the options. It reads the text file whose each line has the module name and print the '--enable-module=NAME \' for each line to the standard output. (Such a text file is specified as the argument to this script.) It looks like this:
	echo "{" >enable_module.awk
	awk '{print "if($1==\""$1"\"){\nprint \"--enable-module=\"$2\n}"}' $1 >>enable_module.awk
	echo "}" >>enable_module.awk
	awk -f enable_module.awk module_map.txt |\
	awk '{print $0" \\"}' -
	rm enable_module.awk
Note that this script also reads 'module_map.txt', which acts as the dictionary for the converting the module name. That's all! The above shell script is available here.

3: The third party modules

For each third party module, we should consult the INSTALL file supplied with the source distribution. The required procedures are different for each modules, but they are categorized into the following:

Whether the procedure modifies the source(or source tree) of Apache or not is most important. If it is true, the such a modification must precede the installation of Apache itself. Otherwise, the module can be compiled independently from the installation of Apache. The installation procedure of the third party modules listed above are grouped as follows: Taking this categorization into account, I divide the whole installation procedure into the 4 steps:
  1. Configure the modules which belong to TYPE1 and TYPE2. This applies the patch to Apache source and installs the module source into the source tree of Apache.(View shell script)
  2. Configure Apache. In this step, we specify the standard modules to compile.(View shell script)
  3. Examine whether the appropriate 'Makefile's are generated or not.(Read instruction)
  4. Build Apache, which also compiles the modules which belong to TYPE1 and TYPE2, in addition to the standard modules.(View shell script)
  5. Configure and build the modules which belong to TYPE3 outside the source tree of Apache.(View shell script)
And I wrote the shell scripts for each steps. Clicking the links in the above list will show you their content. Or tared-and-gziped file is available here.

Java and all Java-based trademarks and logos are trademarks or registered of Sun Microsystems, Inc. in the United States and other countries.


Previous Page Contents Next Page
OOP-Reserch home page

Mail to Me


ALL CONTENTS COPYRIGHT 2000 , Jun Inamori. All rights reserved.
Any questions and comments are welcome to Jun Inamori .