O'Reilly logo

Apache: The Definitive Guide, Second Edition by Peter Laurie, Ben Laurie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

1.8. Making Apache Under Unix

Download the most recent Apache source code from a suitable mirror site: a list can be found at http://www.apache.org/.[‖‖] You can also load an older version from the enclosed CD-ROM. You will get a compressed file, with the extension .gz if it has been gzipped, or .Z if it has been compressed. Most Unix software available on the Web (including the Apache source code) is compressed using gzip, a GNU compression tool. If you don't have a copy, you will find one on our CD, or you can get it from the Web.

[‖‖] It is best to download it, so you get the latest version with all its bug fixes and security patches.

When expanded, the Apache .tar file creates a tree of subdirectories. Each new release does the same, so you need to create a directory on your FreeBSD machine where all this can live sensibly. We put all our source directories in /usr/local/etc/apache. Go there, copy the <apachename>.tar.gz or <apachename>.tar.Z file, and uncompress the .Z version or gunzip (or gzip -d ) the .gz version:

            uncompress <
            apachename
            >.tar.Z
         

or:

            gzip -d <
            apachename
            >.tar.gz
         

Make sure that the resulting file is called <apachename>.tar, or tar may turn up its nose. If not, type:

            mv 
            <
            apachename
            > 
            <
            apachename
            >.tar
         

Now unpack it: [##]

[##] If you are using GNU tar , it is possible to uncompress and unpack in one step: tar zxvf < apachename >.tar.gz.

            % tar xvf <
            apachename
            >.tar
         

The file will make itself a subdirectory, such as apache_1.3.1. Keep the .tar file ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required