You want to build the Apache Web server yourself from the sources directly (see Recipe 1.4), but don’t know how to obtain them.
There are a number of ways to obtain the sources. You can access the latest version in close to real-time by using Subversion (the tool used by the Apache developers for source control), you can download a release tarball, or you can install a source package prepared by a distributor, among others.
To install from a prepackaged tarball, download the tarball from http://httpd.apache.org/download.cgi, and then:
%tar xzvf
httpd-2.0.59.tar.gz
If your version of tar
doesn’t support the z
option for processing zipped
archives, use this command instead:
%gunzip -c <
httpd-2.0.59.tar.gz
| tar xvf -
From the very latest up-to-the-minute Apache 2.0 source repository (not guaranteed to be completely functional), use:
% svn checkout http://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x/ httpd-2.0
You can fetch a particular release version instead of the bleeding edge code if you know the name the developers gave it. For example, this will pull the sources of the 2.0.59 release, which is expected to be stable, unlike the up-to-the-minute version:
% svn checkout http://svn.apache.org/repos/asf/httpd/httpd/tags/2.0.59/ httpd-2.0.59
You can find the names of the tags used in the source tree by visiting either http://svn.apache.org/viewvc/httpd/httpd/tags/ or with:
% svn ls http://svn.apache.org/repos/asf/httpd/httpd/tags/
No matter how you install the source, the directory tree will be ready for configuration and building. Once the source is in place, you should be able to move directly to building the package (see Recipe 1.4).
If you chose to install the sources using the Subversion method, you can keep your sources up-to-date by simply executing the following command from the top level of the source directory:
% svn update
This will update or fetch any files that have been changed or added by the developers since the last time you downloaded or updated.
If you update to the latest version of the sources, you’re getting whatever the developers are currently working on, which may be only partially finished. If you want reliability, stick with the released versions, which have been extensively tested.
Get Apache Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.