The manual Page
Version française
   
index | glossary | news | downloads | links ]
  RPMs
 
news
glossary
links
downloads
 
credits
contact
 
 
search
 
last update
19/02/2003
Valid HTML 4.0!
Valid CSS!
Hit-Parade
Mesurez votre audience


  RPMs

What is this?

RPM stands for Red Hat Package Manager. It is the system developed by Red Hat to manage the packages of their Linux distribution. It is a very efficient system used to install or uninstall any kind of applications (compilation tools, KDE...) under Linux. Usually, we also call RPMs the files that have a .rpm extension, not really packages.

WARNING! This system is typical from Red Hat and may not work properly with other distributions. However, it is compatible with the Mandrake distribution.

RPM files are recognized with their .rpm extensions. Their names are usually made up with something like that: name_of_the_package-version.processor.rpm.

Use

Everything is performed with the rpm command.

How to install or update a package

It is very easy to install a RPM. Use one of these line:

rpm -i file.rpm
rpm -Uvh file.rpm

The i simply means "install this package". The U means "update"; it is obviously used to update an already installed package or install a new one if it is not installed yet. vh is used to display a scrolling bar to know in what state is the installation process.

Uninstall an application

This is also quite simple:

rpm -e name_of_the_package

WARNING! One must only use the name of the package (mysql, apache...) and not the complete name of the file.

You can also add a small vh to make it nicer...

Queries

It is often useful to know what packages are installed on the system, what files are copied, or even have a short description of the package. Everytime you want to know something about a package you want to do a query. This is done with the -q option. Then, straight after it, we use an other option (a letter) to tell exactly what we want. The 4 most useful options are the following:

option effect
a displays the list of already installed packages
p used to make a query on a non installed package (indicated by its file name)
i displays a short description of a package
l displays the list of files that are installed with by package

The basic rule is this one: if we want to query an installed package, then we do not need to use p (rpm -qa, rpm -ql package...) and the name of the package is enough (apache, patch...). But if we want to query a package that is not installed, we must use p followed by the complete name of its .rpm file.

Examples:

  • To display the complete list of installed packages:
    rpm -qa
  • To display the list of files that are copied with the installed foo package:
    rpm -ql foo
  • To display a short description of the non installed foo-1.0.0.rpm package:
    rpm -qpi foo-1.0.0.rpm

Tricks

It frenquently happens that we are looking for the package that would install a given file (typically, this happens when you are compiling something that requires as86). Here is a shell command line that may be used to look for a file in the RPM files of the local directory. Let's assume we are looking for /usr/foo/bar:

for FILE in $(ls *rpm); do if rpm -qpl $FILE | grep -q "/usr/foo/bar"; then echo $FILE fi; done

printable format printable format



Copyright © 2000-2002 themanualpage.org - This site is submissive to the terms of the GNU GPL and FDL licences.