- System configuration
- Updating packages
- Installing new packages
- Removing installed packages
- Interactive yum shell
IntroductionScientific Linux CERN 5 systems are using YUM (Yellowdog Updater, Modified) and its graphical frontend Yumex as software management utilities.
The original YUM was implemented for Yellowdog Linux. The current YUM implementation is maintained by Linux@DUKE and is used by Red Hat Enterprise Linux and Fedora Linux distributions as default update mechanism.
In the default setup the automatic software updates mechanism is enabled.
System ConfigurationAdditional extensions to yum update system are distributed in following packages: yum-autoupdate, yum-installonlyn, yum-versionlock, yum-tsflags, yum-changelog, yum-protectbase, yum-kernel-module and yum-utils. System configuration files are distributed as yum-conf package. All of the above are installed by default on SLC5 systems.
- contains information about location of system software repository:
[slc5-os] name=Scientific Linux CERN 5 (SLC5) base system packages baseurl=http://linuxsoft.cern.ch/cern/slc5X/$basearch/yum/os/ gpgcheck=1 enabled=1 protect=1
- contains information about location of addon software repository:
[slc5-extras] name=Scientific Linux CERN 5 (SLC5) add-on packages, no formal support baseurl=http://linuxsoft.cern.ch/cern/slc5X/$basearch/yum/extras/ gpgcheck=1 enabled=1 protect=1
- contains information about location of system updates software repository:
[slc5-updates] name=Scientific Linux CERN 5 (SLC5) bugfix and security updates baseurl=http://linuxsoft.cern.ch/cern/slc5X/$basearch/yum/updates/ gpgcheck=1 enabled=1 protect=1
- contains information about location of software testing repository:
[slc5-testing] name=Scientific Linux CERN 5 (SLC5) packages in testing phase baseurl=http://linuxsoft.cern.ch/cern/slc5X/$basearch/yum/testing/ gpgcheck=1 enabled=1 protect=1
- contains information about location of addon EPEL (Extra Packages for Enterprise Linux) software repository:
[epel] name=Extra Packages for Enterprise Linux add-ons, no formal support from CERN baseurl=http://linuxsoft.cern.ch/epel/5/$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL gpgcheck=1 enabled=1 protect=0
(enabled=1 in above configuration files means that given repository is active by default, protect=1 means that given repository takes precedence over one which does not have protect flag enabled)
- contains settings of automatic updates system:
#YUMHOUR=4 (0..23)Hour at which the automatic update system shall act (when invoked from /etc/cron.hourly/yum-autoupdate). Please note that this is not the exact time at which the update will start: The system will first wait for a random (but shorter than one hour) time interval. (Please avoid setting YUMHOUR to 0 or 1 - at that time the software repositories are synchronized between servers and in some cases it could lead to transient errors)
#YUMMAIL=1 (1/0)- enables / disables e-mail messages from the update system.
#YUMMAILTO="root" (email@example.com)/ - e-mail address where information messages are sent.
#YUMUPDATE=1 (1|0)If set to 1 updates are applied, if 0 system only checks the availability of updates and sends e-mail notification.
#YUMUPDATESECONLY=0 (1|0)If set to 1 only security updates are applied / checked for, if to 0 all updates are applied / checked for.
#YUMRANDOMWAIT=30 (0..60)Maximum time od random wait (past YUMHOUR) before update system starts.
#YUMCLEAN=1 (1|0)If set to 1 system will clean up unused local package cache contents (/var/cache/yum).
Enabling/Disabling update systemIn order to enable the automatic update system run following commands:
/sbin/chkconfig --add yum-autoupdate
/sbin/service yum-autoupdate start
In order to disable the system run:
/sbin/service yum-autoupdate stop
/sbin/chkconfig --del yum-autoupdate
Updating packagesTo update installed software set to latest versions run:
/usr/bin/yum updatewhich will perform necessary dependency resolution, download packages and install them. For above also the GUI (Graphical User Interface) called yumex can be used.
Excluding packages from upgradeThe update operation will apply all upgrades available from the package repositories.
If for some reason some packages should be excluded from such upgrade it is possible to 'lock' a list of packages at given versions:
echo "PACKAGENAME-VERSION-RELEASE" >> /etc/yum/pluginconf.d/versionlock.list
Please note that packages depending on 'locked' package will also be excluded from future upgrades.
To restore default system upgrade procedure please edit /etc/yum/pluginconf.d/versionlock.list file.
Installing packagesIn order to install additional packages available in repositories run:
/usr/bin/yum install packagenamewhich will download and install packagename along with its dependencies. For above also the yumex GUI can be used.
Removing packagesIn order to remove an installed package from the system run:
/usr/bin/yum remove packagenamewhich will remove the package (along with all packages depending on it, so review the output of the command carefully...). For above also the yumex GUI can be used.
Cleaning local package repositoryOver time the local yum cache (located at: /var/cache/yum/) can grow considerably. In order to clean it run:
/usr/bin/yum clean all
Interactive yum shellCurrent versions of yum come with an interactive shell providing few more interesting features (like listing of available packages etc). To start the shell run:
/usr/bin/yum shellTo list all packages available run:
> listmore commands and help can be found by typing:
More informationFor detailed instructions on how to perform software management using yumex GUI tool please check Yumex instructions.