Simple software management

At the risk of some really breathtaking simplification, here's how to do very basic RPM-based software management in one page. A later chapter will cover RPM management in far more detail.

The basic unit of software installation in a number of Linux distributions is the RPM file which typically contains some combination of binary executables, configuration files, documentation files, install and uninstall scripts and possibly more. The rpm command lets you examine, install and remove software an RPM-based chunk at a time.

First, be careful with your use of terminology. One can refer both to a package, like the "zip" software package, and to the RPM file that contains that software, which might be the zip-2.3-14.i386.rpm file. The name of the RPM file makes it clear that this file contains the zip software, version 2.3, build number 14, that has been precompiled for an i386 architecture.

Using the rpm command, you can do basic software management as follows (and note very carefully where you would use just the package name and where you would use the full file name):

# rpm -qa | less                   list all installed packages
# rpm -q zip                       query a single installed package

# rpm -i zip-2.3-14.i386.rpm       install an RPM file
# rpm -ivh zip-2.3-14.i386.rpm     install that file verbosely
 
# rpm -e zip                       remove an installed package
 
# rpm -Uvh zip-2.4-5.i386.rpm      upgrade an installed package
  

As I said, this is a drastic simplification of RPM-based software management. A later section will discuss how to example the contents of an RPM file, how to check dependencies and so on.

Note

If you're running RedHat Linux and want to experiment, there are hundreds of RPM files on the first three official installation CDs. You can also find additional RPM files at web sites like http://www.rpmfind.net, http://www.freshmeat.net and http://freshrpms.net.

Warning

Any file that ends with the suffix .src.rpm is not a precompiled RPM file; it's a source RPM which contains the original source code for building the binary RPM file. How to deal with source RPM files will also be covered in a later chapter. For now, just make sure you don't try to work with one of these files by mistake.