Page 86 - DCAP106_OPERATING_SYSTEM_TOOLS
P. 86

Unit 4: Installing Software




                                                                                                Notes


              Task  Compare contrast Zipped compressions and Gzipped compressions.


          4.3.7 Looking for Documentation


          Most developers provide README or INSTALL files in the program archive. These are text files
          that include instructions on compiling and installing the program.
          Linux provides a developer’s utility called make. This utility allows the developer to provide a
          script called a Makefile, which, when run through make, will compile the program automatically.
          The Makefile can also include installation instructions.
          In most cases, change to the directory containing the source code, then run the command make,
          followed by the command make install. There might also a configure script that needs to be run
          with ./configure before the make command.

          4.3.8 Configuring the Package

          Most packages ship with an auto-configuration script; it is safe to assume they do unless their
          documentation  says  otherwise.  These  scripts  are  typically  named  configure,  and  they  take
          parameters. There are a handful of stock parameters that are available across all configure scripts,
          but the interesting stuff occurs on a program-by-program basis. Each package will have a handful
          of features that can be enabled or disabled or that have special values set at compile time, and
          they must be set up via configure.
          To see what configure options come with a package, simply run:
          ./configure --help
          Yes, those are two hyphens (--) before the word “help.”

          One commonly available option is --prefix. This option allows you to set the base directory where
          the package gets installed. By default, most packages use /usr/local. Each component in the
          package will install into the appropriate directory in /usr/local.
          With all of the options you want set up, a final run of configure will create a special type of file
          called a makefile. Makefiles are the foundation of the compilation phase. Generally, if configure
          fails you will not get a makefile.
               !

             Caution Make sure that the configure command did indeed complete without any errors.
          4.3.9 Compiling Your Package


          One of the key benefits of open-source software is that you have the source code in your hands.
          If the developer chooses to stop working on it, you can continue. If you find a problem, you can
          fix it. In other words, you are in control of the situation and not at the mercy of a commercial
          developer you can’t control. But having the source code means you need to be able to compile it,
          too. Otherwise all you have is a bunch of text files that can’t do much.
          In this section, we will step through the process of compiling the Hello package, a GNU software
          package  that  might  seem  useless  at  first,  but  there  are  reasons  for  its  existence.  Most  GNU
          software conforms to a standard method of installing, so let’s go ahead and get the package.





                                           LOVELY PROFESSIONAL UNIVERSITY                                    79
   81   82   83   84   85   86   87   88   89   90   91