10.2.2. Installing

10.2.2. Installing

RPM packages typically have file names like foo-1.0-1.i386.rpm. The file name includes the package name (foo), version (1.0), release (1), and architecture (i386). To install a package, log in as root and type the following command at a shell prompt:

rpm -ivh foo-1.0-1.i386.rpm

Alternatively, the following command can also be used:

rpm -Uvh foo-1.0-1.i386.rpm

If the installation is successful, the following output is displayed:

 Preparing... ########################################### [100%] 1:foo ########################################### [100%]

As you can see, RPM prints out the name of the package and then prints a succession of hash marks as a progress meter while the package is installed.

The signature of a package is checked automatically when installing or upgrading a package. The signature confirms that the package was signed by an authorized party. For example, if the verification of the signature fails, an error message such as the following is displayed:

error: V3 DSA signature: BAD, key ID 0352860f

If it is a new, header-only, signature, an error message such as the following is displayed:

error: Header V3 DSA signature: BAD, key ID 0352860f

If you do not have the appropriate key installed to verify the signature, the message contains the word NOKEY such as:

warning: V3 DSA signature: NOKEY, key ID 0352860f

Refer to Section 10.3, “Checking a Package's Signature” for more information on checking a package's signature.

Warning

If you are installing a kernel package, you should use rpm -ivh instead. Refer to Chapter 40, Manually Upgrading the Kernel for details.


Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.