Skip to content

December 20, 2010

rpm basics

The RedHat Package Manager (RPM) is a popular package management system. Using RPM it’s easier to install, uninstall, and upgrade software packages. Apart from that, it’s possible to query a package for details and also can verify the integrity of installed packages.

Mainly there are two types of RPM packages

 1) Binary packages
 2) source packages

Binary package has been compiled for a particular architecture and is ready for installation, whereas source package contains source files to build a binary package.
Here am giving some examples for RPM installing, uninstalling, upgrading, querying, and verifying software packages.

Naming Convention used in RPM

Consider the Apache RPM package –> httpd-2.0.53-3.3.i386.rpm

  name--version--release--arch--.rpm

httpd –> name of the software
2.0.53 –> software version (that of the original software source)
3.3 –> package release number
i386 –> architecture (like 32 or 64 bit)

Corresponding source package is httpd-2.0.53-3.3.src.rpm (note ’src’ in the name).

RPM Instalaltion


To install a package, we mainly use the “-ivh” option

$ rpm -ivh httpd-2.0.53-3.3.i386.rpm

Preparing… ########################################### [100%]
1:httpd ########################################### [100%]

Flags used are;

-v flag can be used to introduce some verbosity,
-h flag displays hash marked progress of the installation.
-i installing

RPM Installation over Network

$ rpm -ivh ftp:////package.rpm

$ rpm -ivh http:////package.rpm

Uninstalling RPM
To Uninstall an RPM, Use the -e option

$ rpm -e httpd-2.0.53-3.3.i386.rpm

Just have to specify name of the package to be removed.

If the pakages are not removed and it shows some dependencies over other installed packages, To ignore the error and uninstall the package use the following option,

rpm -e --nodeps httpd-2.0.53-3.3.i386.rpm

–nodeps –> Do Not Check Dependencies Before Erasing Package

“This is not a recomendaded usage, since it can break other installed packages”

Hope that this will help 🙂

Read more from Commands, Linux

Leave a comment

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments

required
required

*