Difference between revisions of "YUM"

From The System Administrator Zone
(yum update dependency errors)
Line 40: Line 40:
 
yum update
 
yum update
 
</pre>
 
</pre>
 +
 +
== yum tricks ==
 +
=== Keep Downloaded RPMS ===
 +
 +
If you look at */etc/yum.conf* you will see something like the following;
 +
<pre>
 +
[main]
 +
cachedir=/var/cache/yum/$basearch/$releasever
 +
keepcache=0
 +
debuglevel=2
 +
logfile=/var/log/yum.log
 +
</pre>
 +
 +
I you set *keepcache=1", the rpm files will be kept in the cache directory.
 +
 +
 +
 +
 +
 +
 +
  
  
 
[[Category:System Applications]]
 
[[Category:System Applications]]

Revision as of 13:50, 13 November 2011

{toc}

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

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