Installing RPM Packages

The conventional way of installing programs on Linux is to download the program source and compile the program for your particular version of Linux. Other programs are pre-compiled and made available for download as binaries for particular linux versions. These methods of installing programs are much more complicated than the methods used by other operating systems but then there are more versions of linux than of other operating systems making provision of executable programs more difficult.

"There has to be an easier way" said the developers at Redhat and so they developed the Redhat Package Management system to handle the installation of new programs more easily. This system provides a package of all of the required components including complete instructions on how what needs to be done to install the program including what to compile and where to put everything on your system.

Now all that was necessary to install programs on Redhat Linux (and the many other versions of Linux - eg. Mandrake - that have included RPM) is to download the rpm package to your system and execute the rpm command to install the program. As rpm is a complete package management system, it can do a lot more than just install packages so you need to tell it that you want to do an install, for example if you want to install package xyz.rpm then the command that you need to enter (at the command line) is rpm --install xyz.rpm and the package will be installed. A shorter alternative to this command is rpm -i xyz.rpm

Another option of rpm that you may find useful is to reinstall a package that you have already installed. By default rpm will not allow you to overwrite an existing package so you need to tell it that you want it to do so. To reinstall our xyz.rpm package you would enter rpm -i --replacepkgs xyz.rpm at the command line.

You can also upgrade an existing package by using -U instead of -i.

Other options that can be used with the rpm install command include:

There are more parameters that can be used with the rpm install command but the ones listed above should be enough to for most purposes.

The rpm command can also be used to uninstall packages for example rpm -e xyz.rpm will uninstall the xyz.rpm package. The --noscripts, --notriggers, --nodeps, and --test parameters can be used with the uninstall command and have similar meanings to those that they have when used with the install command.

As well as using rpm to install and uninstall packages, it can also be used in a number of other modes. These are: query, verify, signature check, build, rebuild database, fix permissions, set owners and groups, and show rc modes.

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate