Administration
  Home arrow Administration arrow Page 5 - Linux Administration: Installing Softw...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ADMINISTRATION

Linux Administration: Installing Software
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 29
    2004-11-02

    Table of Contents:
  • Linux Administration: Installing Software
  • Installing a New Package
  • Uninstalling a Package
  • Compile and Install GNU Software
  • Looking for Documentation
  • Installing the Package and Testing the Software
  • Common Software Problems
  • Cleanup and When There is No Configure Script
  • Compiling and Installing a GNU Program
  • Project Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Linux Administration: Installing Software - Looking for Documentation
    (Page 5 of 10 )

    Once you are inside the directory with all of the source code, begin looking for documentation. Always read the documentation that comes with the source code! If there are any special compile directions, notes, or warnings, they will most likely be mentioned here. You will save yourself a great deal of agony by reading the relevant files first.

    So then, what are the relevant files? Typically there are two files in a distribution, README and INSTALL, both of which are located in the root of the source code directory. The README file generally includes a description of the package, references to additional documentation (including the installation documentation), and references to the author of the package. The INSTALL file typically has directions for compiling and installing the package.

    These are not, of course, absolutes. Every package has its quirks. The best way to find out is to simply list the directory contents and look for obvious signs of additional documentation. Some packages use different capitalization: readme, README, ReadMe, and so on. Some introduce variations on a theme, such as README.1ST or README.NOW, and so on.

    Another common place for additional information is a subdirectory that is appropriately called “doc” or “documentation.”

    To view a text file, use the more command:

    [root@ford hello-1.3]# more README

    To view the text file in the pico editor, use the pico command:

    [root@ford hello-1.3]# pico README

    TIP  To get a quick list of all the directories in a source tree, enter the command [root@ford hello-1.3]# ls -l | grep drwx.

    Configuring and Compiling the Package

    Most packages ship with an autoconfiguration 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:

    [root@ford hello-1.3]# ./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. Make sure that the configure command did indeed complete without any errors.

    Compiling Your Package

    Compiling your package is the easy part. All you need to do is run make, like so:

    [root@ford hello-1.3]# make

    The make tool reads all of the makefiles that were created by the configure script. These files tell make which files to compile and the order in which to compile them--which is crucial since there could be hundreds of source files.

    Depending on the speed of your system, the available memory, and how busy it is doing other things, the compilation process could take a while to complete, so don’t be surprised.

    As make is working, it will display each command it is running and all of the parameters associated with it. This output is usually the invocation of the compiler and all of the parameters passed to the compiler—it’s pretty tedious stuff that even the programmers were inclined to automate!

    If the compile goes through smoothly, you won’t see any error messages. Most compiler error messages are very clear and distinct, so don’t worry about possibly missing an error. If you do see an error, don’t panic. Most error messages don’t reflect a problem with the program itself, but usually with the system in some way or another. Typically, these messages are the result of inappropriate file permissions (see the chmod command in Module 6) or files that cannot be found. In the latter case, make sure your path has at the very least the /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin, and /usr/X11R6/bin directories in it. You can see your path by issuing the following command:

    [root@ford hello-1.3]# echo $PATH

    See Module 6 for information on environment variables so that you can set your path correctly.

    In general, slow down and read the error message. Even if the format is a little odd, it may explain what is wrong in plain English, thereby allowing you to quickly fix it. If the error is still confusing, look at the documentation that came with the package to see if there is a mailing list or e-mail address you can contact for help. Most developers are more than happy to provide help, but you need to remember to be nice and to the point. (In other words, don’t start an e-mail with a rant about why their software is terrible.)

    This chapter is from Linux Administration, A Beginner's Guide, third edition, by Graham and Shah. (McGraw-Hill/Osborne, 2002, ISBN: 0072225629). Check it out at your favorite bookstore today.

    Buy this book now.

    More Administration Articles
    More By McGraw-Hill/Osborne


     

       

    ADMINISTRATION ARTICLES

    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway