20090916 more stupid yum tricks - plembo/onemoretech GitHub Wiki

title: More stupid yum tricks link: https://onemoretech.wordpress.com/2009/09/16/more-stupid-yum-tricks/ author: lembobro description: post_id: 248 created: 2009/09/16 05:44:52 created_gmt: 2009/09/16 05:44:52 comment_status: open post_name: more-stupid-yum-tricks status: publish post_type: post

More stupid yum tricks

Yum, the Yellow Dog Updater (Modified), is a fantastic piece of software. It originated with Yellow Dog Linux, a distribution that ran on early Apple MacIntosh computers (I was able to successfully install YDL on an old Mac IIci and a Quadra 610 — the 610 was the first PC my oldest son got to play on). Yum is now the preferred package manager for Red Hat Enterprise Linux, after several years of field testing as part of both the Red Hat sponsored Fedora and independent CentOS distributions.

There’s lots of good doc on using it. Among the best is Stuart Ellis’s Managing Software with Yum found on the Fedora Project site. The man pages are also unusually well-written, and have become my first stop when I have questions.

In configuring yum, I usually consult the yum.conf man page. There is also a good “How To” over at the CentOS site on using the yum priorities plugin. The priorities plugin is now the one I use to keep various repositories from stepping on each other. Currently I only use the 3rd party repo managed by Dag Wieers on a regular basis, although I have enabled others, like the Fedora Project’s EPEL, when necessary.

Here’s an example of my modified CentOS-Base.repo:

`

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever
  &arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=3
exclude=kernel*
	
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever
  &arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/
  $basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=2
exclude=kernel*
	
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever
  &arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons
  /$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=4
	
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever
  &arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/
  $basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=4
	
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever
  &arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/
  centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1
includepkgs=kernel*
	
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever
  &arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/
  $basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=4

`

Note that the [centosplus] section has priority 1 and an explicit directive to include all kernel packages, while the base and updates sections are priority 3 and 2, respectively and directives to exclude kernel packages. I’ve configured things this way because I run the centosplus kernel on my machines to take advantage of it’s IEEE1394 interface support (for downloading raw video from a minicam).

Other repos are given lower priority. For example, Dag’s rpmforge.repo is set to priority 15.

Because updates are key to avoiding bugs that allow security exploits or make the system unreliable, it’s important to use a management package system like yum. As stated above, Red Hat now recommends use of yum as its preferred package manager.

Yellow Dog Updater (Modified)

Copyright 2004-2019 Phil Lembo