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

IMPORTANT NOTE

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:
protect=1
or
protect=0
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 
[dag]
name=DAG rpms
baseurl=http://ftp.scientificlinux.org/linux/extra/dag/redhat/el5/en/$basearch/dag/
                http://ftp1.scientificlinux.org/linux/extra/dag/redhat/el5/en/$basearch/dag/
                http://ftp2.scientificlinux.org/linux/extra/dag/redhat/el5/en/$basearch/dag/
                ftp://ftp.scientificlinux.org/linux/extra/dag/redhat/el5/en/$basearch/dag/
enabled=1
# To use priorities you must have yum-priorities installed
priority=30
protect=0
cat /etc/yum.repos.d/sl.repo 
[sl-base]
name=SL 5 base
baseurl=http://ftp.scientificlinux.org/linux/scientific/57/$basearch/SL
                http://ftp1.scientificlinux.org/linux/scientific/57/$basearch/SL
                http://ftp2.scientificlinux.org/linux/scientific/57/$basearch/SL
                ftp://ftp.scientificlinux.org/linux/scientific/57/$basearch/SL
#mirrorlist=ftp://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-base-57.txt
enabled=1
gpgcheck=0
# To use priorities you must have yum-priorities installed
priority=10
protect=1

yum-versionlock

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.
Topic revision: r2 - 2012-01-04 - CristinaAiftimiei
 
This site is powered by the TWiki collaboration platformCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback