Yellow dog Updater, Modified (Yum) is the default package manager used in RHEL4 ( and clones like ScientificLinux and CentOS ). It is used to install and update packages from the official and 3rd party Repositories.
URL's that might come in handy:
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.
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.
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 install -y yum-protectbase
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 RHEL4 or clones, 3rd party Repositories are required (like the DAG Repository). Only OS repos should be protected. Other repos, like DAG, should be unprotected. Here an example:
cat /etc/yum.repos.d/dag.repo [dag] name=DAG (http://dag.wieers.com) additional RPMS repository baseurl=http://linuxsoft.cern.ch/dag/redhat/el4/en/i386/dag enabled=1 protect=0
cat /etc/yum.repos.d/sl4.repo [sl4-base] name=Scientific Linux 4 (SL4-i386) base baseurl=http://linuxsoft.cern.ch/scientific/4x/i386/apt/RPMS.os/ enabled=1 protect=1 [sl4-updates] name=Scientific Linux 4 (SL4-i386) updates baseurl=http://linuxsoft.cern.ch/scientific/4x/i386/apt/RPMS.updates/ enabled=1 protect=1 [sl4-contrib] name=Scientific Linux 4 (SL4-i386) contrib baseurl=http://linuxsoft.cern.ch/scientific/4x/i386/apt/RPMS.contrib/ enabled=1 protect=1
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 install yum-versionlock
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.
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.