Linux Notice App

Rpm manual

 In the early days of the Linux kernel, packages existed in isolation. They could be downloaded, but it was quite a task to install them. The development of RPM Package Manager made it possible to download pre-built packages, which could be installed, upgraded and removed.

RPM Package Manager or RPM (originally Red Hat Package Manager) is a package management system. Originally developed for use in Red Hat Linux, RPM is now used in many Linux or Unix distributions.

Uses of RPM


RPM can be used to:

  • install packaged software
  • upgrade packaged software
  • remove package software
  • query detailed information about installed packaged software
  • verify the integrity of packaged software and resulting software installation

The utility works only with packages built for processing by the rpm package, which have a .rpm extension. (Note, the use of RPM to build software is beyond the scope of this lesson.)

RPM Commands

The general format of an rpm command is:

 rpm -option {rpm-file}

RPM Options

RPM Commands

The general format of an rpm command is:

  1. rpm -option {rpm-file}

RPM Options

option Meaning
-i install a package
-v tells the rpm command to print out verbose (detailed) information as the command runs.
-U upgrade a package
-qa query all installed packages
-qa --last all recently installed packages
-e remove a package
--nodeps install, upgrade or remove a package without checking for dependencies
-h Print 50 hash marks as the package archive is unpacked - hash marks get printed out to assure the installer that the RPM is working, and if it is, how far along it is.
--test tells the rpm command to test the installation or upgrade process but not to install the file
-Vp verify a package

The options can be combined such as -ivh.

Installation and Upgrades

The following command installs php55-5.5.10-1.el6.x86_64.rpm.

  1. rpm -ivh php55-5.5.10-1.el6.x86_64.rpm

 The following command installs without checking it's dependencies. This may impact the correct working of the software.

 rpm -ivh php55-5.5.10-1.el6.x86_64.rpm --nodeps

 When the rpm install or upgrade command runs, it:

  • checks the package and the files it wants to install
  • performs pre-installation tasks
  • uncompresses the files and placing them in the proper locations
  • performs post-processing tasks
  • updates the RPM Database

Package Dependencies

RPM packages often have dependencies. This means that the package to be installed relies on the existence of another package. Prior to the installation of a package, you can test for its dependencies by running the following command:

  1. rpm -i --test php55-5.5.10-1.el6.x86_64.rpm

 This is an example of failed dependencies:

 


Package Upgrades 

The following command upgrades the already installed PHP with php55-5.5.10-1.el6.x86_64.rpm:

 rpm -Uvh php55-5.5.10-1.el6.x86_64.rpm

 Package Removal

The following command removes php55-5.5.10-1.el6.x86_64.rpm:

 rpm -e php55-5.5.10-1.el6.x86_64.rpm

 

No comments

Powered by Blogger.