Recompiling Stronghold on Cross-Platform Systems


This chapter describes how to recompile Stronghold on systems other than Red Hat Linux. Recompiling Stronghold on Red Hat Linux Advanced Server systems is not required. If you want to change a module, you need only to edit the httpd.conf file. If you want to compile a third-party module, compile it according to the instructions in its documentation.

The Configuration file (ServerRoot/src/apace-1.3/Configuration) already contains the code you need to install any module that comes with Stronghold, including the optional modules described later in this chapter. The precompiled modules are compiled into Stronghold when you first install it. Optional modules are commented out of the Configuration file. By uncommenting a line of module code, you can recompile the server to include that module. Commenting out a line of module code and recompiling the server excludes the module.

The order of the module list in the Configuration file affects how the modules are compiled. In general, use these guidelines for dealing with the module list:


To Edit, Configure, and Recompile Stronghold

  1. Switch to the ServerRoot/src/apache-1.3 directory:
       # cd ServerRoot/src
    
  2. Edit the Configuration file to reflect which modules or patches you want:
  3. Save the modified Configuration file.
  4. To add a patch, use the patch utility to specify the patch you want to install:
       # patch -s < patchfile
    
  5. Run Configure:
       # ./Configure
    
  6. Rebuild httpd:
       # make
    
  7. Stop the server:
       # ../bin/stop-server
    
  8. Install the new binaries:
       # make install
    
  9. Start the server:
       # ../bin/start-server
    

Creating an httpd Binary Without mod_perl

On cross-platform systems you can use bin/httpd or bin/httpd-without-perl to get an httpd binary with or without mod_perl statically linked in. To do this, edit the file bin/start-server, and change the line that says:

   | if bin/httpd -d ServerRoot -f conf/httpd.conf ; then

to read as follows:

   | if bin/httpd-without-perl -d ServerRoot -f conf/httpd.conf ; then