One of the keys to Apache's success is its extensible modular architecture. Developers have created custom modules for authentication, streaming audio, database access, and so on. However, Apache itself only comes with a handful of core modules installed.
One of the keys to Apache’s success is its extensible modular architecture. Developers have created custom modules for authentication, streaming audio, database access, and so on. However, Apache itself only comes with a handful of core modules installed.
If you’ve ever needed to add a non-core module to Apache, you’ve probably been through a frustrating process that goes something like this:
- Find the module that you want using Google, another Web search engine, the Apache Module Registry (located at http://modules.apache.org/), or whatever means necessary.
- Download the module, read the instructions, and then download any other required libraries or modules.
- Compile the module as a Dynamic Shared Object (DSO), or completely rebuild Apache.
- Update your Apache configuration.
- Test your new configuration.
- Repeat for each non-core module you’d like to use.
All of that effort can take a fair amount of time and is often error-prone. Fortunately, there’s a better way.
The Apache Toolbox is a suite of scripts that can gather the necessary components required to build a custom Apache Web server. As of this writing, the Apache Toolbox has support for Apache’s 36 core modules as well as 63 of the most popular third-party modules.
Apache Toolbox’s requirements are about as lean as can be. It only requires that you have wget (http://www.gnu.org/software/wget/) and bash installed. The entire Toolbox is a small (roughly 50KB) collection of bash code. It is essentially one big shell script.
Using Apache Toolbox is a breeze. Just download the latest version from the project’s Web site, unpack it, and run install.sh:
$ tar -zxvf Apachetoolbox-
$ cd Apachetoolbox-1.5.54
|Figure One: Apache Toolbox’s main menu|
The script will scan your system to make sure it can find the common utilities (cp, tar, mv, etc.) it needs to manipulate the files it will download. Once all the utilities are located, it will display an interactive text-based menu (see Figure One). Simply navigate the menu and select the modules that you want included in the Apache build.
After you’ve selected all the modules you want to install, simply type go and press the enter key.
The script will then figure out what code must be downloaded and offer to use wget to obtain it. Once everything is downloaded, you have the option of editing the configuration script before Apache Toolbox configures Apache for you. After that’s done, all you need to do is go into the Apache source directory that the Toolbox set up for you and do a make and make install:
$ cd apache_1.3.23
$ make install
That’s all there is to it! Fast, painless setup and compilation of Apache.
But That’s Not All…
Not only does Apache Toolbox save you lots of time by building Apache with all the modules you need, it can even update itself. Running:
will download and install the latest version of Apache Toolbox. As information about new modules is added, you simply run one command to build Apache.
Adding support for new modules isn’t rocket science, either. The files in Apache Toolbox’s etc directory control what appears in each menu. The files in the bin directory control what happens when each module needs to be configured for Apache. By looking at a few examples, you can quickly figure out what needs to be done.
Have an idea for a project we should feature? Drop a note to email@example.com and let us know.
Fatal error: Call to undefined function aa_author_bios() in /opt/apache/dms/b2b/linux-mag.com/site/www/htdocs/wp-content/themes/linuxmag/single.php on line 62