Administration
  Home arrow Administration arrow Page 2 - Linux Administration: Installing Software
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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? 
Google.com  
ADMINISTRATION

Linux Administration: Installing Software
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 30
    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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    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 Option Description
    --force This 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.
    -h Prints 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.

    -nodeps If 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.
    -q Queries the RPM system for information.
    --test This 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.
    -V Verifies RPMs or files on the system.
    -v Tells 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

    - Network Booting via PXE: the Basics
    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - 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





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek