Wednesday, 15 June 2011

Redhat Package Management (RPM)

Folks, Here is Quick Reference and HOWTO for RPM (Redhat Package Management). Hope it will be useful..

  1. Provides package management
   a. Query
   b. Install
   c. Uninstall
   d. Upgrade
   e. Verify
  2. Auto-verifies packages using GPG, MD5, SHA1SUMs
  3. Automatically reports on unresolved dependencies

Install (Does NOT overwrite previous package):
Note: Use this method to install a new version of the kernel
  1. rpm -ivh *.rpm
  2. rpm -ivh

Upgrade (Installs or overwrites existing package):
  1. rpm -Uvh *.rpm
  2. rpm -Uvh

Freshen (Updates an existing package):
Note: Will NOT install the package, if it doesn't exist locally

  1. rpm -Fvh *.rpm - freshens the current version of a package

 1. rpm -ev *.rpm - removes a pacakge
Note: removal process considers dependencies and will complain if the removal will break 1 or more packages. To get around this, use '--nodeps' option with 'rpm -ev --nodeps *.rpm'

 2. rpm -ev gftp


  1. rpm -qa - shows all installed packages
  2. rpm -qa | wc -l - this dumps all packages and provides a count
  3. rpm -qa | grep -i sendmail
  4. rpm -qi nano - dumps info. about the 'sendmail' package as it's recorded in the local RPM database
  5. rpm -qf /usr/bin/nano - dumps package membership info. for the 'nano' file
  6. rpm -qpi - dumps info. about the uninstalled 'dhcp' package, which resides on the repository
  7. rpm -ql package_name - returns all included files

  1. rpm -Va - verifies ALL packages on the system, returning info. only if there are discrepancies from the original installation

  2. rpm -Vf /usr/bin/nano

Task: Change '/usr/bin/nano' then verify

SM5....T   /usr/bin/nano

S(file size), M(mode or permissions), 5(MD5), T(mod time)
  3. rpm -Vp nano

No comments:

Post a Comment

Twitter Bird Gadget