home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Complete Idiot's Guide to Linux
(Publisher: Macmillan Computer Publishing)
Author(s): Manuel Ricart
ISBN: 078971826x
Publication Date: 12/22/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


Chapter 20
Installing Programs and Applications

In This Chapter

  RPM: The Red Hat Package Manager
  Installing, Upgrading, Downgrading, and Removing Software
  Verifying Your System
  Graphical Front Ends to RPM
  Non-RPM Packages

Software installation on Linux is fairly sophisticated through the use of RPM. Although you can install software that has been archived by tar and other programs, most of the time you’ll want to install RPM packages. It goes without saying that when you have a choice on what package format to install, pick the RPM version. RPM packages provide a multitude of benefits, and that’s why we’ll cover it in great detail.

RPM: The Red Hat Package Manager

RPM is an open software and source packaging system. It was initially developed for Linux but has since made available for anyone to use under the GPL.

RPM is a great packaging system because it not only deals with installing software as other systems have done for years but also maintains a database of installed software and their interdependencies. This database is searchable, so you can find what package a file belongs to, and allows you to even check to see if the file has been modified, accidentally corrupted, or deleted since its initial installation. In terms of dependencies, RPM makes sure that you install any required packages that might be necessary for the operation of other software you are installing.

RPM can work through FTP, so you don’t need to download software in order to install it; RPM can do both at the same time. It also keeps a handle on configuration files, so when you upgrade the software or your system, those customizations are maintained. This is something that has been a problem for all operating systems and software installs since the beginning of upgrades.

For developers and programmers, RPM allows the packaging of binaries (programs) and source code for users. If a developer modifies the source code to a program, these ”patches,” as they are called, are maintained separate from the ”pristine” or virgin sources. This makes it easy to upgrade the base source and reapply patches to new versions.

For administrators, RPM allows them to upgrade a system, without reinstalling everything and then going through the configuration pains. RPM can efficiently upgrade only those packages that have changed without losing your customizations.

For up-to-date information on RPM, see http://www.rpm.org on the Web.

Installing, Upgrading, Downgrading, and Removing Software

Just the fact that you can install, upgrade, and downgrade software on your system, and remove it from your system, without having to do so manually is a good enough reason to install rpm software.

Installing

It is extremely easy to install a package. Here is the syntax:

     rpm -i mypackage-1.0-2.i386.rpm

Typically, you might need to have root privileges in order to install a package. RPM takes care of installing everything—software and documentation—putting everything in its right place.

There are some errors you can get while installing. If RPM detects that the new package will overwrite a file belonging to another package, it will inform you of a conflict. To override, you can supply the --replacefiles option:

     rpm -i --replacefiles mypackage-1.0-2.i386.rpm

If a package depends on another, you will see an error telling you that the package requires another. You should obtain the required package and then retry the installation of your software. You can also override this warning with the --nodeps option; however, doing so is setting yourself up for a problem.

If the software is already installed, you’ll get an error telling you that the package has already been installed. To install over the package, you should provide the --repalcepkgs option, like this:

     rpm -i --replacepkgs mypackage-1.0-2.i386.rpm

Upgrading

Upgrading an application is just as simple as installing one. Instead of specifying the -i option, you specify the -U option, like this:

     rpm -U mypackage-1.0-4.i386.rpm

It’s important to keep in mind that upgrading a package actually uninstalls the previous installation. If the configuration files for the upgraded version are not compatible, you’ll see a message telling you so. RPM will save your original configuration file for you to reconcile with the new one.

Downgrading

Sometimes upgrading is really upgrading to new undesirable bugs. To downgrade back to the software you had before you acquired the bugs, just upgrade to the old package and provide the --oldpackage option.

     rpm –U –-oldpackage myoldpackage-1.0-1.i386.rpm

Uninstalling

If you figure out that you don’t want the software you’ve installed, use the -e (Erase) flag. This time, only provide the base name for the package. For a package named mypackage-1.0-4.i386.rpm, just type the following:

     rpm -e mypackage


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.