Three basic software installations are covered here -- using the Red Hat Package Manager, compiling software using the standard GNU compilation method, and compiling and installing the software by hand. (From the book Linux Administration, A Beginner's Guide, third edition by Steven Graham and Steve Shah, McGraw-Hill/Osborne, 0072225629, 2002).
Uninstalling packages with RPM is just as easy as installing them. In most cases, all you will need to type is
[root@ford /root]# rpm -e packagename
where packagename is the name of the package as listed in rpm -qa.
Verifying an RPM
A very cool option to the RPM tool is the ability to verify a package. What happens is RPM looks at the package information in its database, which is assumed to be good. It then compares that information with the binaries and files that are on your system. Unfortunately, in today’s Internet world, where being hacked is a real possibility, this kind of test should tell you instantly if anyone has done something to your system (see Module 11 for tips on securing your system from attacks). For example, if you want to verify that the /bin/ls command is valid, you would type:
[root@ford /root]# rpm –Vf /bin/ls
If everything is okay with /bin/ls, nothing will be displayed to the terminal. If something is wrong, RPM will inform you of what test failed. Some example tests are the MD5 checksum test, file size, and modification times. The moral of the story is: RPM is an ally in finding out what is wrong with your system. If you suspect several things might be wrong, you can verify all installed packages on your system by typing:
[root@ford /root]# rpm –Va
This command verifies all of the packages installed on your system. That’s a lot of files, so you might have to give it some time to complete.
GUI RPM Installers
For those who like a good GUI tool to help simplify their lives, there are several package managers included with your distribution. Gnorpm is a good GNOME tool that will typically work under KDE as well. It performs all of the functions that the command-line version does without forcing you to remember command-line parameters. Of course, this comes at the price of not being scriptable, but that’s why you have the command-line version, too.
Progress Check
What does RPM stand for? (Red Hat Package Manager)
What command is used to query the RPM database? (rpm -q)
This chapter is from Linux Administration, A Beginner's Guide, third edition, by Graham and Shah. (McGraw-Hill/Osborne, 2002, ISBN: 0072225629). Check it out at your favorite bookstore today.