
Apache 1.3 can be configured to use a custom directory layout. The following example shows how one can configure, compile and install apache under the /opt directory.
Configuration
Issue the following call on the command line from the apache src directory:
#./configure --prefix=/opt/apache --exec-prefix=/opt/apache
The prefix option specifies where apache is installed. Key directories that are placed by default in the directory defined by prefix are conf and log.
The exec-prefix options specifies where the executable
files are installed. In the example above, they will be installed in a subdirectory bin under the /opt/apache directory.
To preview the installation layout issue:
#./configure --prefix=/opt/apache --exec-prefix=/opt/apache --show-layout
Installation Preference
My preference is to install an entire apache install in /opt under its own directory, configuration files and binaries included. I like this layout because it is very easy to backup a single directory.
By following a simple symbolic link convention, having a single directory apache install makes upgrading very simple. For example,
consider an installation of apache-1.3.33. The installation may
look like the following:
/opt/apache-1.3.33/
By creating a symlink /opt/apache -> /opt/apache-1.3.33, one can edit
the http.conf file to use /opt/apache and thus not tying it to a specific release number.
When upgrading to apache-1.3.34, the /opt directory may look like:
/opt/apache -> /opt/apache-1.3.33 /opt/apache-1.3.33 /opt/apache-1.3.34
Changing the symlink to /opt/apache -> /opt/apache-1.3.34 and copying the http.conf files to tne new install allows the upgrade of apache
version without major editing of the configuration file(s).
© 2010–2011 Crumpeta Consulting LLC.