Difference: YUMTips (1 vs. 2)

Revision 22012-01-04 - CristinaAiftimiei

Line: 1 to 1
META TOPICPARENT name="TipsTricks"

About YUM

Yellow dog Updater, Modified (Yum) is the default package manager used in RHEL4 RHEL5 RHEL6( and clones like ScientificLinux and CentOS ). It is used to install and update packages from the official and 3rd party Repositories.

YUM Links

* Yum Home Project Page

Enabling/Disabling update system

In order to enable the automatic update system run following commands:
chkconfig --add yum-autoupdate
service yum-autoupdate start

In order to disable the system run:

service yum-autoupdate stop
chkconfig --del yum-autoupdate


It is available the following script disable_yum.sh (thanks Giuseppe Platania) that can be used to REALLY disable yum-autoupdate.

YUM plugins

Additional extensions to yum update system are distributed in following packages: //yum-autoupdate//, //yum-installonlyn//, //yum-versionlock//, //yum-tsflags//, //yum-changelog//, //yum-protectbase// and //yum-utils//.

These plugins are highly recommended for users who are using the default update method. * //yum-protectbase//: This plugin allows certain repositories to be protected. Packages in the protected repositories can't be overridden by packages in non-protected repositories even if the non-protected repo has a later version. * //yum-versionlock//: This plugin allows certain packages specified in a file to be protected from being updated by newer versions.

yum-protectbase ==

The purpose of the protectbase plugin is to protect certain repositories from updates from other repositories. Repositories that are to be protected will not be updated by newer files from unprotected repositories. This plugin is recommended for anyone who routinely enables 3rd party repositories, as these non-SL4 repositories may update certain system files, potentially causing your SL4 installation to become unstable.

yum-protectbase Installation

yum install -y yum-protectbase

yum-protectbase Configuration

After the plugin is installed, you need to edit all .repo files in /etc/yum.repos.d/ and add either:
for each repository.

Note: You MUST add //protect=0// to all repos in all //.repo// files or any repos that you have in ///etc/yum.conf// if you want them unprotected, otherwise they belong to the //protect=1// group.

When doing updates after editing your files, only repositories that have the //protect=1// stanza can update other //protect=1// repositories.

To manage gLite middleware with RHEL5 or clones, 3rd party Repositories are required (like the DAG or EPEL Repository). Only OS repos should be protected. Other repos, like DAG or EPEL, should be unprotected. Here an example:

cat /etc/yum.repos.d/dag.repo 
name=DAG rpms
# To use priorities you must have yum-priorities installed
cat /etc/yum.repos.d/sl.repo 
name=SL 5 base
# To use priorities you must have yum-priorities installed


This plugin prevents packages from getting upgraded beyond given version. The packages are defined in the file ///etc/yum/pluginconf.d/versionlock.list//. The versionlist is in the format of 'rpm -qa'

yum-versionlock Installation

yum install yum-versionlock

yum-versionlock Configuration

Put all packages that have to be locked in the file ///etc/yum/pluginconf.d/versionlock.list//, for example:
rpm -qa |grep bash|sort >> /etc/yum/pluginconf.d/versionlock.list

You need to delete the package entry from /etc/yum/pluginconf.d/versionlock.list to upgrade it.

Reccomandation After a gLite update, it is reccomended to lock MW, yaim packages and metapackages. Here an example:

rpm -qa | grep glite | sort >> /etc/yum/pluginconf.d/versionlock.list
rpm -qa | grep ^ig | sort >> /etc/yum/pluginconf.d/versionlock.list
Remember to remove the entries from ///etc/yum/pluginconf.d/versionlock.list// to unlock the packages.

-- SergioTraldi - 2012-01-04

This site is powered by the TWiki collaboration platformCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback