[CentOS-devel] yum-utils-plugins and yum-utils

Johnny Hughes mailing-lists at hughesjr.com
Sat Nov 26 20:21:46 UTC 2005


In an effort to better distribute files for our users, we have been
working with some of the yum-utils-plugins from the yum website.
Specifically, we have done some work with protectbase and fastestmirror.

Here is the wiki concerning yum plugins:


We are currently testing these plugins, and they seem to work well.
After a couple weeks of testing, we will move these into the main CentOS

Attached is the readme file for the new yum-utils-plugins RPM.

If you want to test these plugins, they are currently in the
dev.centos.org testing repo ... do this to test:

1.  Download the file repo file and put it in /etc/yum.repos.d/

2.  Install yum-utils and yum-utils-plugins with this command:

yum --enable=c4-testing install yum-utils yum-utils-plugins

3.  Enable plugins in yum by editing the file /etc/yum.conf and adding
this line:


4.  To use the protectbase plugin, edit your repos in /etc/yum.repo.d/
and add the following lines to repos you wish to protect (ie, the
Official CentOS repos):


and add the following to third party (or other repos) which you want to
use, but do not want to update/upgrade packages that are part of the
protected repos:


see the attached readme file for an example.

5.  To use the fastestmirror plugin, make sure you have the plugins=1
in /etc/yum.conf (see number 4. above) and then edit
your /etc/yum.repos.d/ repos and add more than 1 mirror (as baseurl= )
for some of your repos ... see the attached readme file for some

Currently, the verbose setting is high for fastestmirror ... you may
adjust that in /etc/yum/pluginconf.d/fastestmirror.conf.  We will
probably make this verbose=0 on final release.

6.  There are other plugins that are not enabled by default .... you can
see all the plugins in /usr/share/doc/yum-utils-0.3.1/plugins

To enable a plugin that is not currently enabled, copy the .py file from
it's directory to /usr/lib/yum-plugins/ and it's .conf file
to /etc/yum/pluginconf.d/

(and make sure that /etc/yum.conf has a plugins=1 line in it)

yum-utils is also installed.  See the README in /usr/share/doc/yum-
utils/ for all the commands you can do with yum-utils.

Johnny Hughes
-------------- next part --------------
The 2 packages protectbase and fastestmirror are enabled by default.

In order to use yum plugins, edit the file /etc/yum.conf and add a line
that says:


protectbase will not upgrade packages in protected repos with packages from
unprotected repos.  You can, for example, set all centos repos to protected
and set 3rd party repos to unprotected, then you can install new programs
from the third party repos, but yum won't overwrite core files.

For each repo that you want to protect, add the line:


in that repo's section.  Your repo files are normally in the directory
/etc/yum.repos.d/ and they are named xxxxxx.repo

For example, here is a protected and non-protected entry:

name=CentOS-$releasever - Base

name=Dag RPM Repository for EL$releasever

The fastest mirror plugin will test multiple mirrors listed for a repo and 
rate them by speed, then use them in that order.  This adds a couple seconds
at the beginning of the download process, but can greatly increase your
download speed and stability.  

In the above 2 examples for [base] and [dag] there are 4 mirrors in each entry.
If using the fastestmirror plugin, you will have each mirror ranked by 
connection speed to your PC at the time you run yum.

other plugins
There are other plugins in this directory.  If you want to enable them, you 
would copy their .conf files to /etc/yum/pluginconf.d and their .py files to


See this link for more info about yum plugins:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.centos.org/pipermail/centos-devel/attachments/20051126/22dbf7f9/attachment.sig>

More information about the CentOS-devel mailing list