User Tools

Site Tools


Package Management


yum is the standard package manager on RHEL 5 and higher

yum basics


yum check-update
yum update


yum install <package name>


yum remove <package name>

show installed packages

yum list installed [regex]

show packages available

yum list available [regex]

show packages with updates available

yum list updates [regex]

resolving dependency conflicts

yum clean all

…or the hardcore way

rm -rf /var/cache/yum/*

Which package provides a certain command?

Use “whatprovides” with yum. Below an example for the command “yum-complete-transaction” which takes part of “yum-utils”:

yum whatprovides "*/yum-complete-transaction[/i]"

Convert RedHat 5 64bit to Centos 5.6


cp /etc/redhat-release /etc/redhat-release-saved
rpm -e --nodeps redhat-release-notes redhat-release yum-rhn-plugin redhat-logos
rpm -ivh \ \ \
yum update

Convert CentOS 5 to RedHat 5

Remove CentOS specific rpm's

rpm -e --nodeps desktop-backgrounds-basic-2.0-41.el5.centos.noarch
rpm -e --nodeps redhat-logos-4.9.99-11.el5.centos.noarch
rpm -e --nodeps centos-release centos-release-notes

Install special RedHat packages (you have to download/copy the packages to the system first)

rpm -ivh redhat-release-notes-5Server-31.x86_64.rpm redhat-release-5Server- redhat-logos-4.9.16-1.noarch.rpm
rpm -ivh yum-rhn-plugin


yum update

Siehe auch


remove / clean old kernels

package-cleanup --oldkernels

remove unused / old packages

package-cleanup --cleandupes

finish uncompleted transactions


cleaning up unfinished transaction journals

yum-complete-transaction --cleanup-only


up2date is the standard package manager until RHEL 4

List Updates available from redhat network:

up2date -l

Install available updates (without kernel updates):

up2date -u

Install updates and kernel updates (force):

up2date -uf

Show packages available from red hat network:

up2date --show-available

Search a package by name

The example searches all packages containing the word 'php'

up2date --show-available | grep php

Install new packages:

up2date -i <package-name>

Configure up2date to use proxy

Configure up2date:

up2date --configure

Chose the following options:

  • enable proxy = Yes
  • http_proxy =

Install new packages from red hat network (download, install):

up2date -di <package-name>


install a rmp package

rpm -i package.rpm

remove (erase) a rpm package

rpm -e package.rpm

install a source rpm package

rpmbuild --rebuild package.scr.rpm

search for a installed package (mysql)

rpm -q mysql

show all installed kernels

rpm -qa | grep kernel

Additional Repositories


Extra Packages for Enterprise Linux (EPEL) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux (RHEL) and its compatible spinoffs such as CentOS or Scientific Linux.

Using EPEL packages on RHEL 5

Example install (x64 package):

rpm -Uvi

After installing the rpm above, you're able to manage EPEL packages over yum or up2date.

RPMforge Packages

Using third-party repositories, you can have the stable base of CentOS with more up-to-date packages (of course, it goes without saying that you sacrifice some of the stability that makes RedHat/CentOS so good by doing so!).

See the following links for installation:

RBEL Packages

For chef, ruby 1.9.2 and nginx for CentOS 5/6 see here:

/srv/ · Last modified: 2011/12/12 16:13 (external edit)