Chapter 15.131Package Management with RPMThe RPM Package Manager (RPM) is an open packaging system, available for anyone to use, whichruns on Red Hat Enterprise Linux as well as other Linux and UNIX systems. Red Hat, Inc encouragesother vendors to use RPM for their own products. RPM is distributable under the terms of the GPL.For the end user, RPM makes system updates easy. Installing, uninstalling, and upgrading RPMpackages can be accomplished with short commands. RPM maintains a database of installedpackages and their files, so you can invoke powerful queries and verifications on your system. If youprefer a graphical interface, you can use the Package Management Tool to perform many RPMcommands.During upgrades, RPM handles configuration files carefully, so that you never lose yourcustomizations — something that you cannot accomplish with regular .tar.gz files.For the developer, RPM allows you to take software source code and package it into source andbinary packages for end users. This process is quite simple and is driven from a single file andoptional patches that you create. This clear delineation between pristine sources and your patchesalong with build instructions eases the maintenance of the package as new versions of the softwareare released.NoteBecause RPM makes changes to your system, you must be root to install, remove, orupgrade an RPM package.15.1. RPM Design GoalsTo understand how to use RPM, it can be helpful to understand RPM's design goals:UpgradabilityUsing RPM, you can upgrade individual components of your system without completelyreinstalling. When you get a new release of an operating system based on RPM (such as Red HatEnterprise Linux), you do not need to reinstall on your machine (as you do with operating systemsbased on other packaging systems). RPM allows intelligent, fully-automated, in-place upgrades ofyour system. Configuration files in packages are preserved across upgrades, so you do not loseyour customizations. There are no special upgrade files needed to upgrade a package becausethe same RPM file is used to install and upgrade the package on your system.Powerful QueryingRPM is designed to provide powerful querying options. You can do searches through your entiredatabase for packages or just for certain files. You can also easily find out what package a filebelongs to and from where the package came. The files an RPM package contains are in acompressed archive, with a custom binary header containing useful information about the packageand its contents, allowing you to query individual packages quickly and easily.System VerificationAnother powerful feature is the ability to verify packages. If you are worried that you deleted animportant file for some package, verify the package. You are notified of any anomalies. At thatpoint, you can reinstall the package if necessary. Any configuration files that you modified arepreserved during reinstallation.