This section contains an overview of principal modes using with RPM for installing, uninstalling, upgrading, querying, listing, and checking RPM packages on your Linux system. You must be familiar with these RPM commands now because we'll use them often in the continuation of this book.
To install a RPM package, use the command:
| [root@deep] /#rpm -ivh foo-1.0-2.i386.rpm |
To uninstall a RPM package, use the command:
| [root@deep] /#rpm -e foo |
To upgrade a RPM package, use the command:
| [root@deep] /#rpm -Uvh foo-1.0-2.i386.rpm |
To query a RPM package, use the command:
| [root@deep] /#rpm -q foo |
To display package information, use the command:
| [root@deep] /#rpm -qi foo |
To list files in package, use the command:
| [root@deep] /#rpm -qlfoo |
To check a RPM signature package, use the command:
| [root@deep] /#rpm --checksig foo |
Try to use your Linux distro's package manager whenever possible. This will help alleviate the need to download associated dependant packages (in most cases).
Pick the RPM file that is made specifically for your Linux distro, if possible. Using a RPM file designed for another distribution could spell a disasterous install and a less than stable system.
In most cases, you may need to use the command terminal. Make sure than you log in as root (su) with the appropriate root password, then navigate to the folder that you downloaded the RPM file to:
Then follow the commands listed above! Usually rpm -ivh packagename will do the trick!