Apache DevCenter
oreilly.comSafari Books Online.Conferences.

advertisement


   Print.Print
Email.Email article link
Apache Cookbook (cover)

Apache Recipe of the Day

The following recipe is from Apache Cookbook, by Ken Coar and Rich Bowen. All links in this recipe point to the online version of the book on the Safari Bookshelf.

Buy it now, or read it online on the Safari Bookshelf.


-->

1.3. Downloading the Apache Sources

. Solution

There are a number of ways to obtain the sources. You can access the latest version in close to real-time by using CVS, 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.

From a prepackaged tarball, download the tarball from http://httpd.apache.org/dist/, and then:

% tar xzvf apache_1.3.27.tar.gz

If your version of tar doesn't support the z option for processing zipped archives, use this command instead:

% gunzip -c < apache_1.3.27.tar.gz | tar xvf -

From the very latest up-to-the-minute Apache 1.3 source repository (not guaranteed to be completely functional), use:

% cvs -d :pserver:anoncvs@CVS.Apache.Org:/home/cvspublic login
     Password: anoncvs
% cvs -d :pserver:anoncvs@CVS.Apache.Org:/home/cvspublic checkout apache-1.3

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 1.3.27 release, which is expected to be stable, unlike the up-to-the-minute version:

% cvs -d :pserver:anoncvs@CVS.Apache.Org:/home/cvspublic checkout -r APACHE_1_3_27
     apache-1.3

From the very latest up-to-the-minute Apache 2.0 source repository (not guaranteed to be completely functional), use:

% cvs -d :pserver:anoncvs@CVS.Apache.Org:/home/cvspublic login
     Password: anoncvs
% cvs -d :pserver:anoncvs@CVS.Apache.Org:/home/cvspublic checkout -r 
     APACHE_2_0_BRANCH httpd-2.0
% cd httpd-2.0/srclib
% cvs checkout apr apr-util

As with the method for the 1.3 version of the server, you can fetch a particular release of the 2.0 code if you know the name assigned to it in CVS.

You can find the names of the tags used in the source tree by visiting either http://cvs.apache.org/viewcvs.cgi/apache-1.3/ or http://cvs.apache.org/viewcvs.cgi/httpd-2.0/ and pulling down the Show files using tag list at the bottom of the page.

TIP

All sorts of tags are used by the developers for various purposes. The tags used to label versions of files used for a release are always of the form APACHE_n_m_e, so use these to work with a particular release version.

. Discussion

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 CVS method, you can keep your sources up-to-date by simply executing the following command from the top level of the source directory:

% cvs update -Pd

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.


View the past week's recipes: Today | Yesterday | 3 days ago | 4 days ago | 5 days ago | 6 days ago | A week ago


Sponsored by: