RPM

Yum is actually a manager of a manager. The manager that Yum manages is RPM, the Red Hat Package Manager which manages the actions of the package itself where Yum manages which packages are needed. See my notes on RPM for specifics.

Is Package Installed?

It can sometimes be tricky to get conclusive information on whether something is already present. If you don’t want to just try installing it and seeing if that works (my usual technique), this works.

yum list installed inkscape

Note the exit code is sensible.

Update Excluding Kernel

This can be useful on workstations running proprietary nVidia drivers. Doing general updates will be fine, but if the kernel is updated the drivers have to be rebuilt. To avoid this (temporarily, of course) use something like this.

sudo yum -y --exclude='kernel*' update

Repositories

Try:

sudo yum repolist

elrepo

This seems to be required for proprietary nvidia drivers. Check the centos notes for details.

nux-desktop

What kind of flakery is this? Well, looks like as of 2017-09-28 it’s officially recommended if you want H.264 video and some other normal user stuff.

Install:

    yum install -y http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-re
lease-0-1.el7.nux.noarch.rpm
    yum-config-manager --enable nux-desktop

Check:

yum repolist

Install:

yum install x264

Some packages to consider from this repository:

  • flash-plugin

  • icedtea-web

  • vlc

  • smplayer

  • ffmpeg

  • HandBrake-{gui,cli}

  • libdvdcss

  • gstreamer{,1}-plugins-ugly

  • gstreamer-plugins-bad-nonfree

  • gstreamer1-plugins-bad-freeworld

EPEL - Extra Packages for Enterprise Linux

The latest technique I have tried for this is to simply:

sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

Or

sudo rpm -Uvh http://ftp.linux.ncsu.edu/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

You can find a whole list of mirrors (necessary since many are often unreliabe).

ElRepo

Not to be confused with EPEL, ElReop is another CentOS Repository. The important thing about it is probably a native way to install proprietary Nvidia drivers.

CentOS 7 EPEL

Authoritative information about this project: http://fedoraproject.org/wiki/EPEL

What packages are available from this repo? Here’s a list.

Installing the repo is (finally) very easy (in CentOS 7).

yum install epel-release

Old Information About CentOS 5

Note
I’m a thinking that for CentOS this repo is not especially necessary or useful if you’re going to use the rpmforge one. Best to leave it out of the plan if you can.

Just discovered that the R statistics package has a more complete installation from EPEL than the RPMForge. To get it working I copied this into /etc/yum.repos.d/epel.repo:

[epel]
name=Extra Packages for Enterprise Linux 5 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 5 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debug
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 5 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1

Then you have to create a /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL or it won’t believe in the validity of the repository. I did this with a command like this:

sudo wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL https://fedoraproject.org/static/217521F6.txt

Keep in mind that this actually didn’t go so great since it broke R. This repo is sketchy. Ended up yum erase R R-devel and then reinstalling it with the epel repo active and then it worked. Sometimes that’s how it goes.

I tried to install a fix for a network driver module that became non functional because of an update, but the fix didn’t work.

Google

Looks like Chrome works on CentOS 6! This is how to take advantage of it. Wait, now it it looks like Google says CentOS 6 (and Red Hat… seriously?) is obsolete.

Here’s the best info on getting Chromium working on CentOS 6:

Note that after following these instructions you’ll need to do some terrible thing to run Chromium like this:

/opt/chromium/chrome-wrapper %U \
--ppapi-flash-path=/opt/chromium/PepperFlash/libpepflashplayer.so \
--ppapi-flash-version=$(grep '"version":' \
/opt/chromium/PepperFlash/manifest.json | grep -Po '(?<=version": ")(?:\d|\.)*')

Adobe

Instructions found on Adobe’s site describe how to get the Adobe repository installed. If you don’t already have it, search for it if Adobe’s site doesn’t make it obvious.

The link above for getting Chromium working also handles Adobe Flash and a PDF viewer. Check that Flash is installed correctly here.

Java

Getting Java plugins to work in a browser can be annoying. I found that for Firefox, the following package works:

sudo yum install -y icedtea-web

This depends on something like: java-1.6.0-openjdk-1.6.0.0-1.43.1.10.6.el6_2.x86_64 This is the Java that’s normally found on CentOS 6.

Here’s a resource to troubleshoot Java browsing nonsense.

CentOS 6

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
cd /tmp
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

rpm --import https://fedoraproject.org/static/0608B895.txt
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
rpm -ivh epel-release-6-5.noarch.rpm

yum install yum-priorities

Edit /etc/yum.repos.d/epel.repo…

vi /etc/yum.repos.d/epel.repo
  1. and add the line priority=10 to the [epel] section:

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
priority=10
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
[...]

Then we update our existing packages on the system:

yum update

Configuration

The priority system determines which package will be used in case two systems have the same one. It is configured by editing /etc/yum/pluginconf.d/priorities.conf.

It should include this:

[main]
enabled = 1

Also /etc/yum.repos.d/CentOS-Base.repo should be edited to include this sort of thing:

[base]
priority=1
[updates]
priority=1
[addons]
priority=1
[extras]
priority=1
[centosplus]
priority=2
[contrib]
priority=2

Troubleshooting

When it hangs on "Setting up repositories" Try rpm --rebuilddb. Or maybe rpm --initdb.

Almost out of disk space?

# yum clean all

And then this to sneak in an update with limited space:

# yum check-update | sed -n "4,\$p" | awk '{print $1}' | xargs -n 1 yum -y update

I had it yum updates die with this error:

GPG key retrieval failed: [Errno 5] OSError: [Errno 2] No such
file or directory: '/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL'

This was from a failed attempt to install EPEL and the cure was simply:

sudo rm  /etc/yum.repos.d/epel*

Does yum fail to update the "filesystem" package? This is probably because you are mounting /home over NFS and it wants to touch this directory to make sure it’s there and root squash issues prevents that. My solution was something like this:

sudo umount -l /home; sudo yum -y update; sudo mount /home

Of course if it’s a busy system with a lot of user action, this could be messy.

RPMforge -OBSOLETE-

Warning
Looks like rpmforge, a.k.a. repoforge is obsolete. The CentOS Additional Resources wiki page says: "RPMForge/RepoForge - Although once recommended, this repository is no longer maintained, and is not advised." Who am I to argue with them?

Instructions found on this web page indicated the following procedure for installing RPMforge on CentOS 5:

Steps to setting up RPMforge
  1. Get the repository rpm.

    wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm

Or just install it from over the web. This is the newer version for CentOS 6, 64-bit:

sudo rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
  1. Import key.

    sudo rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
  2. Check package with key. (Obviously this is somewhat optional.)

    rpm -K rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
  3. Install this package.

    sudo rpm -ivh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
  4. Enjoy!

    sudo yum install xpdf mercurial asciidoc