Administration
  Home arrow Administration arrow Page 2 - 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
     
     
    ibm
     
    ADVERTISEMENT

    Dell PowerEdge Servers

    Linux Administration: Installing Software - Installing a New Package
    (Page 2 of 10 )

    The easiest way to install a new package is to use the -i option with RPM. For example, if you downloaded a package called bc-1.05a-4.i386.rpm and wanted to install it, you would type:

    [root@ford /root]# rpm -ivh bc-1.05a-4.i386.rpm

    If the installation went fine, you would not see any errors or messages. This is the most common method of installing RPMs. On the other hand, if the package already exists, you would see this message:

    error: package bc-1.05a-4 is already installed

    Some packages rely on other packages. A game, for example, may depend on SVGA libraries having already been installed. In those instances, you will get a message indicating which packages need to be installed first. Simply install those packages and then come back to the original package.

    If you need to upgrade a package that already exists, use the -U option, like so:

    [root@ford /root]# rpm -Uv bc-1.05a-4.i386.rpm

    Some additional command-line options to RPM are listed in Table 1.

    Command-Line OptionDescription
    --forceThis is the sledgehammer of installation. Typically, you use it when you’re knowingly installing an odd or unusual configuration, and RPM’s safeguards are trying to keep you from doing so. The --force option tells RPM to forego any sanity checks and just do it, even if it thinks you’re trying to fit a square peg into a round hole. Be careful with this option.
    -hPrints hash marks to indicate progress during an installation. Use with the -v option for a pretty display.
    --percent

    Prints the percentage completed to indicate progress. It is handy if you’re running RPM from another program, such as a Perl script, and you want to know the status of the install.

    -nodepsIf RPM is complaining about missing dependency files, but you want the installation to happen anyway, passing this option at the command line will cause RPM to not perform any dependency checks.
    -qQueries the RPM system for information.
    --testThis option does not perform a real installation; it just checks to see whether an installation would succeed. If it anticipates problems, it displays what they’ll be.
    -VVerifies RPMs or files on the system.
    -vTells RPM to be verbose about its actions.

    Table 1  RPM Command-Line Options

    For example, to force the installation of a package regardless of dependencies or other errors, you would type:

    [root@ford /root]# rpm -i --force -nodeps packagename.rpm

    where packagename.rpm is the name of the package being installed.

    Querying a Package

    Sometimes it is handy to know which packages are currently installed and what they do. You can do that with the RPM query options.

    To list all installed packages, simply type:

    [root@ford /root]# rpm -qa

    Be ready for a long list of packages! If you are looking for a particular package name, you can use the grep command to specify the name (or part of the name) of the package, like so:

    [root@ford /root]# rpm -qa | grep -i ' name'

    NOTE  The -i parameter in grep tells it to make its search case-insensitive.

    If you just want to view all of the packages one screen at a time, you can use the more command, like so:

    [root@ford /root]# rpm -qa | more

    To find out which package a particular file belongs to, type:

    [root@ford /root]# rpm -qf filename

    where filename is the name of the file that you want to check on.

    To find out the purpose of a package that is already installed, you must first know the name of the package (taken from the listing in rpm -qa) and then specify it, like so:

    [root@ford /root]# rpm -qi packagename

    where packagename is the name of the package that you want information about.

    To find out what files are contained in a package, type:

    [root@ford /root]# rpm -qlp packagename

    where packagename is the name of the package that you want information about.

    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 5 hosted by Hostway