RPM Package Management (RPM) provides the framework in which software is installed, updated, and uninstalled in Fedora Core and Red Hat Enterprise Linux systems. Many other Linux distributions are based on the RPM system, including SUSE, Mandrake, and others. RPM command line and GUI tools can provide the means to query, verify, and otherwise manage the software on your computer.
This chapter describes the basic tools you need to manage software packages in RPM format in Fedora and other Red Hat Linux systems. It also helps you verify and query RPM packages before you install them and troubleshoot problems you may encounter, such as resolving package dependencies and fixing broken RPM databases.
For those who need to set up and maintain Linux systems, software management is a critical issue. You need to strike a balance between having the most up-to-date versions of the software you want and the stability that you need for the systems you maintain. You also need to make sure that your software is both compatible (doesn't break other software) and secure (hasn't been compromised).
By using RPM tools that come with all Red Hat software distributions, you can learn skills for managing and securing your software packages. The primary tools for managing RPM packages in Fedora Core and Red Hat Enterprise Linux include the following:
rpm command-This offers options for querying, verifying, installing, upgrading, and removing packages. There are also various options for working with the RPM database.
Package Management window-The Package Management window provides a graphical means of viewing, adding, and removing packages that are part of the Linux distribution. Packages are grouped together and dependencies are taken into account when you try to add or delete packages. To get to the Package Management window, from the Red Hat menu, click System Settings⇨Add/Remove Applications.
As a bonus, the skills you'll learn while working with these tools will apply to many different RPM-based Linux distributions.
In this chapter, I focus primarily on using the rpm command to manage and query the software packages on your Linux systems. Because rpm is such a useful tool, its uses are also described in a few other places in this book:
Installing, updating, and upgrading-Chapters 1 and 2 cover the basics of installing Linux, then doing subsequent software updates and upgrades. Whether these packages are grabbed from an installation CD or from yum or apt software repositories, for the most part you should end up with all or most of your software installed from RPM packages. Some useful rpm examples are included in these chapters.
Detecting intrusions-Chapter 10 describes how to use RPM to see if someone has tampered with the software on your Linux system, based on the contents of your RPM database.
Assuming that you have already installed your basic Linux operating system, this chapter will give you examples of lots of different ways you can manipulate those packages and the RPM database that stores information about them.