RPMs aren’t just for automotive aficionados. They're also Red Hat’s answer to the establishment’s EXE files.
Linux 101 installments are intended to bring IT professionals unacquainted with Linux up to speed quickly on the alternative operating system's more basic features and uses.
Installing with RPM
The Red Hat Package Management system (RPM) is a user-friendly, yet robust, standardized installation application that makes installation, uninstallation, verification, and querying programs simple, while retaining the common strengths and efficiency of Linux.
Like many Linux commands and applications, RPM accepts arguments and flags, adding to its usefulness. These arguments (like many Linux arguments) dictate to RPM the nature of the request made—allowing user modification and control.
Let's examine the common uses of RPM.
An RPM file (a binary file used for application installation) comes with the extension RPM and is the Linux equivalent of the Windows EXE file. RPM can only be run as root (super user) from the command line, with the GUI tools gnoRPM (from the GNOME desktop environment), or from kpackage (from the KDE environment). For installation with RPM, there are a few "common" arguments sent to the routine. Among the most useful installation flags are:
- -I, install (install the listed package)
- -v, verbose (output verbose messages to the screen as package installs)
- -h, hash (print out hash marks to indicate progress)
With the above arguments, there can be a great many variations. For example, you can install with verbose output only using the -Iv combination, or you can upgrade with both verbose information and hash marks using -Uvh. (We'll look at the U argument in a minute.)
With the arguments in this short list, you can install with a command similar to this one:
RPM -ivh this_package-1.1.RPM
which would install this_package-1.1 with verbose output and hash marks indicating the installation's progress.
Once you've installed the application, you can check the installation with the following argument:
RPM -q this_package
would report the following information:
Upgrading with RPM is as simple as installing. To upgrade a package, you just need to add the following argument:
Should you want to upgrade this_package-1.1 to this_package-1.2, run RPM with the upgrade argument like this:
RPM -Uvh this_package-1.2
Upgrading with RPM allows you to extend the verbose and hash arguments as if installing.
And finally, to uninstall this_package, run RPM with the following flags:
The complete command looks like this:
RPM -e this_package
The Red Hat Package Management system is a well-designed, fully functional, user-friendly method of managing applications and programs within the Linux environment. The RPM technology was unique to Red Hat Linux, but it is also now used with many other distributions, such as Mandrake, Caldera, and SuSE.
Jack Wallen is TechRepublic’s Linux resident expert. When he’s not out busting up mountain bikes and helping wounded MCSEs back to camp, he’s hacking away diligently at one of his many Linux-powered PCs.If you'd like to share your opinion, please post a comment at the bottom of this page.
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.