Page 38 - Open Soource Technologies 304.indd
P. 38

Unit 3: Apache Server



               2.  Root access on this computer.                                                  Notes
               3.  For binary and source installations, the tar and gunzip Unix utilities.
            3.2.3 Binary Installation

            A binary is pre-configured, which means someone else has gone to the trouble of configuring
            and  building  the  software  for  you.  There  are,  however,  a  few  things  you  should  keep  in
            mind: Binaries are compiled for a particular operating system. In other words, you must use
            a binary built specifically for FreeBSD on your FreeBSD machine and a Linux binary on your
            Linux machine. You need to be sure to grab the correct binary; if you don’t see a binary for
            your particular operating system, you must choose a different method of installation. Apache
            Binaries are usually a version or two behind the current source distribution. This means you
            don’t reap the benefits of the latest bug fixes and feature enhancements. Because binaries are
            pre-configured, you don’t have much opportunity to alter the way the software works. If you’re
            a newcomer, you may not care about this loss of flexibility. Fortunately most Apache binaries
            include a full source distribution, providing you with the best of both worlds—play now, learn
            later. Now let’s install a binary. Point your browser at http://www.apache.org/dist/httpd/
            binaries/  and  download  the  binary  for  your  operating  system  (in  our  case,  Linux).  You’ll
            most likely be presented with a directory containing multiple versions of Apache in various
            compressed forms. For the purposes of this guide, I’ll assume you’ve downloaded the gzip’d
            form of the latest 2.0.x Apache binary (currently that’s httpd-2.0.35-i686-pc-linux-rh72.tar.gz).
            If there is a README associated with the file you’re downloading, you may want to review it
            for any interesting installation tidbits or possible bugs.

            3.2.4 RPM Installation
            Those of you running Red Hat Linux may want to take advantage of Red Hat’s RPM (“RedHat
            Package  Manager”)  system.  Almost  identical  to  a  binary,  an  RPM  is  further  customized  to
            play  nicely  with  other  RPMs  and  provide  a  consistent  interface  to  installing,  updating,  and
            removing binaries. For Linux newcomers or when installing a small standard component, RPMs
            are simple and reliable. Bear in mind that an Apache RPM may already be installed on your
            system depending on how Linux was originally installed on your computer. To find out, at the
            shell prompt, type:

            rpm -qa | grep apache If you see something like apache-1.3.9xxx, an Apache RPM has already been
            installed. You can also type that command typing httpd instead of apache to see if it’s installed.

            If  you  don’t  have  an  Apache  RPM,  you  must  obtain  one.  Red  Hat  7.3  ships  apache-1.3.23-
            11.src.rpm in the RedHat/RPMS directory on the installation CD. Or, point your browser at
            ftp://ftp.redhat.com/pub/redhat/redhat-7.3-en/os/i386/RedHat/RPMS and download it. If
            you’ve not already done so, you’ll need to become root. Navigate to the same directory as the
            .rpm file you obtained, and then type the following command, substituting the name of the
            .rpm you’re using for example: apache-1.3.23-11.src.rpm.
            rpm -ivh apache-1.3.23-11.src.rpm

            RPM should grind away, displaying its progress with a primitive ####### progress bar. Barring
            any errors, you’re done.






                                             LOVELY PROFESSIONAL UNIVERSITY                                    33
   33   34   35   36   37   38   39   40   41   42   43