Linux - RPM (The Red Hat Package Manager) - How to

What is RPM?

The Red Hat Package Manager (RPM) is a toolset used to build and manage software packages on UNIX systems. Distributed with the Red Hat Linux distribution and its derivatives (CentOS is 100% compatible rebuild of the Rehat Enterprise Linux).

The rpm files represent application or package that you can install on Linux system.

If you don't have them, you can find them via rpmfind

Articles Related

Syntax

The naming scheme of RPM files is itself a standardized convention. RPMs have the format

(name)-(version)-(build).(platform).rpm. 

For example, the name cat-2.4-7.i386.rpm would mean an RPM :

  • for the utility “cat”
  • version 2.4, build 7
  • for the x86 (When the platform name is replaced by “src”, it's a source RPM)

Location of documentation for installed packages

The location of the documentation for installed packages is:

/usr/share/doc

For example, the documentation for the redhat-config-date software package is located in

/usr/share/doc/redhat-config-date-<version-number>. 

How to install them

With the shell

You can use this syntax rpm -i or -Uvh.

[root@oel11g Server]# rpm -i samba*
error: Failed dependencies:
        perl(Convert::ASN1) is needed by samba-3.0.33-3.7.el5.i386
[root@oel11g Server]# rpm -i samba-3.0.33-3.7.el5.i386
error: open of samba-3.0.33-3.7.el5.i386 failed: No such file or directory
[root@oel11g Server]# rpm -i samba*
        package samba-common-3.0.33-3.7.el5.i386 is already installed
        package samba-client-3.0.33-3.7.el5.i386 is already installed
[root@oel11g Server]# 

More ...How can I install or upgrade a package? Can I install an old one?

On Red Hat / Oracle Entreprise Linux

With the Gnome gui

How to see if a package is already installed ?

An interesting command for checking if a package is installed or to find out all packages that match a string is:

rpm -qa | grep -i python 

where:

  • q = query
  • a = all

How to deinstall a package ?

From the command above, take the package name (without the architecture and rpm extension) and perform the following command

rpm -e package

where:

  • e = erase

Documentation / Reference

  • Bookmark "Linux - RPM (The Red Hat Package Manager) - How to" at del.icio.us
  • Bookmark "Linux - RPM (The Red Hat Package Manager) - How to" at Digg
  • Bookmark "Linux - RPM (The Red Hat Package Manager) - How to" at Ask
  • Bookmark "Linux - RPM (The Red Hat Package Manager) - How to" at Google
  • Bookmark "Linux - RPM (The Red Hat Package Manager) - How to" at StumbleUpon
  • Bookmark "Linux - RPM (The Red Hat Package Manager) - How to" at Technorati
  • Bookmark "Linux - RPM (The Red Hat Package Manager) - How to" at Live Bookmarks
  • Bookmark "Linux - RPM (The Red Hat Package Manager) - How to" at Yahoo! Myweb
  • Bookmark "Linux - RPM (The Red Hat Package Manager) - How to" at Facebook
  • Bookmark "Linux - RPM (The Red Hat Package Manager) - How to" at Yahoo! Bookmarks
  • Bookmark "Linux - RPM (The Red Hat Package Manager) - How to" at Twitter
  • Bookmark "Linux - RPM (The Red Hat Package Manager) - How to" at myAOL
 
linux/rpm.txt · Last modified: 2010/05/12 08:45 by gerardnico