YUM

From The System Administrator Zone

YUM Command Options

List of all available packages:

yum list available

Check for an available package: (php in this example)

yum list available | grep -i php

Install a package: (If you do not type a package name, all available packages will be installed.)

yum install [package name]

Update a package:
(If you do not type a package name, all available packages will be updated.)

yum update [package name]

List all available updates:

yum check-update

Search for a package:

yum search SEARCH_STRING

Configuring Yum Repositories

Yum Run Time Notes

yum update dependency errors

If you get major dependency errors running a "yum update" on CentOS or Red Hat, the fix is simple;

yum clean all
yum update

yum tricks

Keep Downloaded RPMS

If you look at */etc/yum.conf* you will see something like the following;

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log

If you set "keepcache=1", the rpm files will be kept in the cache directory.