By now you must be familiar with a lot of configure options. However, each Web server administrator operates under different circumstances and is influenced by different perceptions. To me, the following command has proven to be the most helpful:
#./configure --prefix=/usr/local/apache \ >--server-uid=www \ >--server-gid=www \ >--htdocsdir=/opt/web/html \ >--cgidir=/opt/web/cgi-bin \ >--enable-module=most \ >--enable-shared=max
Now, review the additional options that I specified:
- The –server-uid=www option indicates that the Apache server will run as the user ID www. Remember that you created a user named www.
- The –server-gid=www option indicates that the Apache server will run with the group ID www.
- The –htdocsdir option indicates that the default Web site files will be located in the /opt/web/html directory. This is an optional argument.
- The –cgidir=/opt/web/cgi-bin option indicates that the default CGI files will be located in the /opt/web/cgi-bin directory.
The output of the preceding command appears as shown here:
Configuring for Apache, Version 1.3.24 + using installation path layout: Apache (config.layout) Creating Makefile Creating Configuration.apaci in src + enabling mod_so for DSO support Creating Makefile in src + configured for Linux platform + setting C compiler to gcc + setting C pre-processor to gcc -E + checking for system header files + adding selected modules o rewrite_module uses ConfigStart/End + using -lndbm for DBM support enabling DBM support for mod_rewrite o dbm_auth_module uses ConfigStart/End + using system Expat + using -ldl for vendor DSO support + checking sizeof various data types + doing sanity check on compiler and options Creating Makefile in src/support Creating Makefile in src/regex Creating Makefile in src/os/unix Creating Makefile in src/ap Creating Makefile in src/main Creating Makefile in src/modules/standard Creating Makefile in src/modules/proxy
Now you are ready to compile the Apache source. The configure script has laid down the instructions for the compiler. The compiler will use these instructions to compile the source code. After running the configure script, a set of makefiles is generated. These makefiles are used by the make utility to do the following:
- Compile the source files.
- Link the source files to function libraries.
- Install the source files in appropriate locations.
You should be familiar with two more important files, config.status and config.layout. These files contain certain essential information that assists in the compilation process. Now examine each of these files in detail before compiling the source.