Linux: RPM Package Management
scottalanmiller last edited by scottalanmiller
There are two dominant package management systems for Linux today and in the Red Hat and Suse ecosystems, that package format is known as RPM, the "Red Hat Package Manager." (There has been an attempt to rename this to the RPM Package Manager but I've never met someone who accepts the rename and it is a very silly rename.) RPM represents both a package management system and the format of packages which it deploys. In this article we are going to look at how to work with the RPM system and RPM packages, but not how to create our own or how RPMs are managed typically on a higher level (such as with YUM).
History: RPM was made in 1997 to replace Red Hat's 1995 pm package management system which was based on an earlier non-Red Hat pms package management system from Bogus Linux in 1993. So the history of RPM and package management goes back a very long way and was release as a contemporary of Windows NT 3.1.
Key Linux Distributions that use the RPM format: RHEL (Red Hat Enterprise Linux), CentOS, Scientific Linux, Oracle Linux, Fedora, Suse and OpenSuse. The RPM format is now also used in IBM's AIX UNIX OS and in Novell's Netware.
As administrators, it is very important to understand how the RPM system works, although these days it is increasingly rare to work with RPMs or the RPM system directly. For more than a decade it has been standard for a higher level package manager to manage the RPM system for us (YUM on RHEL, CentOS, Fedora and Zypper on Suse and OpenSuse) which bring much more power to the system. But we must understand what those tools are doing and there will be times that we want to drop down to RPM itself and work with it.
Under the RPM system, packages are simply known as RPMs and RPM files are, against Linux and UNIX conventions, always named ending it .rpm, in fact if they are not, the commands will not work with them. An oddity of the system.
RPMs are installed either from the filesystem (this could be local or a mapped drive) or directly from a web site using an URL via HTTP. It is quite flexible.
The RPM system is managed via the rpm command. This command allows us to install and uninstall packages, query packages as to their contents and settings, and to query and work with the RPM database on our Linux system. The local RPM database is quite literally a database that contains information about the packages installed on the local system. It is an embedded database, you will find no process running for this database. The RPM database is a Berkeley DB database.
We need to learn the RPM command as it related to "modes". For example, the query or install modes. We always think of the RPM command broken up in this manner.
The Fedora Project maintains a complete command reference:
Run through the examples in the following associated lessons but do so using different packages than the ones I used in the examples. Pick a package or two that interests you and see if you can learn more about it.