Software Management with RPM and Yum

The Redhat Package Manager, or rpm, is the core package medium for software packing with Redhat and CentOS Linux. All default system software is installed using rpm files for the distribution, and further software can be installed/updated from rpm designed for that distribution as well.

The Yellowdog Updater Modified, or 'yum', is an RPM compatible package management tool. With yum, system software can be installed, updated, and queried from remote rpm package repositories. With yum, most system software can be retrieved and installed automatically.

RPM

With the 'rpm' tool, packages can be installed from the local or remote file systems, and information about installed packages can be quieried.

CommandPurpose
rpm -ivh ./package-1.2-3.el5.x86_64.rpm Install a local rpm package.
rpm -ivh http://url-to-package.rpm Install a remote rpm package.
rpm -Uvh ./package-1.2-3.el5.x86_64.rpm Update an installed package.
rpm -e package Remove an installed package.
rpm -qa List all installed packages.
rpm -ql package List all files for installed package.
rpm -qo /usr/sbin/httpd Find which package a file belongs to.

Yum

Yum is a front-end to rpm, which is used to remove and install from a package repository.

CommandPurpose
yum update Search for any package updates available from the enabled repositories.
yum install package Install the latest version available, and any dependencies.
yum remove package Remove an installed package. Any packages that were installed as a dependency will also be removed.
yum info package Provide information about a package.
yum search string Search the repository cache.
yum clean all Clean out temporary and downloaded files from the local cache.