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

Open Source Technologies



                   Notes         3.2.5 Build from Source

                                 Building Apache from source may seem like a daunting task to newcomers, but the Apache
                                 developers have done a wonderful job of making the task about as simple as could be. Just three
                                 more commands than a binary installation and you skip the arduous task of figuring out which
                                 binary is the right one for your particular operating system.
                                 Point your browser at http://www.apache.org/dist/httpd/ and download the gzip’d form of
                                 the current version of Apache (2.0.36 at the time of this writing).

                                 Now let’s uncompress that archive using gunzip and tar. You should replace the httpd-2.0.36.
                                 tar.gz below with the name of the gzip’d file you downloaded.
                                 gunzip < httpd-2.0.36.tar.gz | tar xvf – You should end up with an httpd-2.0.x directory, x being
                                 the particular sub-version of Apache.

                                 you downloaded. Move into the newly created directory. cd httpd-2.0.x.
                                 Now we’ll use the configure and make commands to configure, make, and install Apache. If
                                 you’ve not already done so, now would be the time to become root.

                                 ./configure
                                 Your screen should look something like:

                                 # ./configure
                                 checking for chosen layout... Apache.

                                 checking for working mkdir -p... yes.

                                 checking build system type... i686-pc-linux-gnu.
                                 checking host system type... i686-pc-linux-gnu.

                                 checking target system type... i686-pc-linux-gnu.

                                 Configuring Apache Portable Runtime library.
                                 ...

                                 config.status: executing default commands

                                 Unless errors were reported (not warnings), your Apache installation is now configured and we
                                 can move on. This is where things get a bit ugly. Make’ing Apache produces screenfulls of output.

                                 make
                                 Your screen should look something like:

                                 # make

                                 Making all in srclib
                                 make[1]: Entering directory ‘/home/ryan/dl/apache_guide/httpd-







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