SLC6 - Managing software¶
Software Management
- Introduction
- System configuration
- Updating packages
- Installing new packages
- Removing installed packages
- Interactive yum shell
Introduction
Scientific Linux CERN 6 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 Configuration
Additional 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 sl-release package. All of the above are installed by default on SLC6 systems.
Configuration files
/etc/yum.repos.d/slc6-os.repo
- contains information about
location of system software repository:
[slc6-os] name=Scientific Linux CERN 6 (SLC6) base system packages baseurl=http://linuxsoft.cern.ch/cern/slc6X/$basearch/yum/os/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cern gpgcheck=1 enabled=1 protect=1
/etc/yum.repos.d/slc6-extras.repo
- contains information about
location of addon software repository:
[slc6-extras] name=Scientific Linux CERN 6 (SLC6) add-on packages, no formal support baseurl=http://linuxsoft.cern.ch/cern/slc6X/$basearch/yum/extras/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cern gpgcheck=1 enabled=1 protect=1
/etc/yum.repos.d/slc6-updates.repo
- contains information about
location of system updates software repository:
[slc6-updates] name=Scientific Linux CERN 6 (SLC6) bugfix and security updates baseurl=http://linuxsoft.cern.ch/cern/slc6X/$basearch/yum/updates/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cern gpgcheck=1 enabled=1 protect=1
/etc/yum.repos.d/slc6-testing.repo
- contains information about
location of software testing repository:
[slc6-testing] name=Scientific Linux CERN 6 (SLC6) packages in testing phase baseurl=http://linuxsoft.cern.ch/cern/slc6X/$basearch/yum/testing/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cern gpgcheck=1 enabled=1 protect=1
/etc/yum.repos.d/slc6-cernonly.repo
- contains information about
location of addon packages that are only available from within the CERN site:
[slc6-cernonly] name=Scientific Linux CERN 6 (SLC6) CERN-only packages baseurl=http://linuxsoft.cern.ch/onlycern/slc6X/$basearch/yum/cernonly/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cern gpgcheck=1 enabled=1 protect=1
/etc/yum.repos.d/epel.repo
- contains information about
location of addon EPEL (Extra Packages for Enterprise Linux) software repository:
[epel] name=UNSUPPORTED: Extra Packages for Enterprise Linux add-ons, no formal support from CERN baseurl=http://linuxsoft.cern.ch/epel/6/$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 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)
Note that each of these configuration files also contains information about the source and debuginfo packages associated to the repositories.
/etc/sysconfig/yum-autoupdate
- 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" (whoever@somewhere.there)/ - 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 system
In 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 packages
To update installed software set to latest versions run:/usr/bin/yum updatewhich will perform necessary dependency resolution, download packages and install them.
Excluding packages from upgrade
The 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 packages
In 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 packages
In 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...).
Cleaning local package repository
Over 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 shell
Current 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:
> help
More information
For detailed instructions on how to perform software management using yum please refer to the man pages:man yum