Defindit Docs and Howto Home

This page last modified: Jul 10 2009
keywords:yum,pgp,gpg,keys,rpm,import,install,public,fedora,grep,root,list,all,info,find,package,manager,repo,repository,remi,livna,rpmfusion,
description:Yum command line hints (all versions of yum) and how to install yum GPG keys (especially Fedora Core 3 Linux).
title:Yum GPG keys: Find and Install keys for Fedora Linux

Table of contents
-----------------
Yum hints 
Yum GPG keys



Yum hints
---------

In general, you will run yum from the command line. Some instructions
will have you use sudo, but the effect is more or less the same. Using
sudo is irritating. Be careful when logged in as root. You can easily
destroy your system. Be especially careful with rm -fr.

Yum has some ability to "search" for a package, but it has to read
through all it's local databases, and then get online. The process is
slow and irritating. I suggest that you occasionally run yum list all
and save the list. Use grep to search the list. This is fast and
easy. When you don't know a package name, use Google to find hints
about the package name, then use grep to search your list. You can
also use yum info for informational text about a given package. 

It is often good to use grep -i to get a case-insensitive search. If
you run the commands below, you'll see that the gifted people who name
packages use mixed-case names such as perl-DBD-Pg.i386 and
libdbi-dbd-pgsql.i386.

su -l root
yum list all > yum_list.txt
grep -i perl yum_list.txt
grep -i perl yum_list.txt | less
grep -i dbd yum_list.txt
yum install perl-DBD-Pg
yum install perl-DBI
grep -i xmms yum_list.txt
yum -y install xmms xmms-flac xmms-mp3


There are additional repositories you may want to include. These
include: livna, remi, and rpmfusion. Google the names for info. In
general you use rpm to install an rpm with yum configuration
files. Use yum -enabablerepo=somename to list and/or install.

The remi repo has more recent versions of some packages such as
Firefox. The livna repo has certain software that Redhat/Fedora do not
include (for various reasons, many of which I think are lame).

yum list all --enablerepo=remi > yum_list2.txt
grep firefox yum_list2.txt
yum install firefox --enablerepo=remi 




Yum GPG keys
------------

yum keys are included with the Fedora installation, and heaven only
knows why they aren't installed by default. 

Run "rpm --import" on the keys in /usr/share/doc/fedora-release-*

[root@lilac ~]# rpm --import /usr/share/doc/fedora-release-3/R


Given these kind of silly mistakes, I can only assume that several of
the Fedora developers work for Microsoft and are trying to make Linux
as irritating as possible.

Here is a session transcript. Notice the failure when trying to locate files
similar in name to what yum suggests. locate is case sensitive.

With a little luck, this information should apply to non-Fedora
distributions as well. You just have to ferret out which directory
contains the keys.

[root@lilac ~]# yum install thunderbird

You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
    rpm --import public.gpg.key
For more information contact your distribution or package provider.
[root@lilac ~]# locate gpg.key
[root@lilac ~]# locate public | less
[root@lilac ~]# locate GPG
/usr/share/rhn/RPM-GPG-KEY-fedora-test
/usr/share/rhn/BETA-RPM-GPG-KEY
/usr/share/rhn/RPM-GPG-KEY
/usr/share/rhn/RPM-GPG-KEY-fedora
/usr/share/doc/fedora-release-3/RPM-GPG-KEY-rawhide
/usr/share/doc/fedora-release-3/RPM-GPG-KEY-fedora-test
/usr/share/doc/fedora-release-3/RPM-GPG-KEY-fedora-rawhide
/usr/share/doc/fedora-release-3/RPM-GPG-KEY
/usr/share/doc/fedora-release-3/RPM-GPG-KEY-beta
/usr/share/doc/fedora-release-3/RPM-GPG-KEY-fedora
/usr/share/doc/rpm-4.3.2/RPM-GPG-KEY
/usr/share/doc/rpm-4.3.2/BETA-GPG-KEY
[root@lilac ~]# rpm --import /usr/share/doc/fedora-release-3/RPM-GPG-KEY*
[root@lilac ~]# yum install thunderbird
Setting up Install Process
Setting up Repo:  base
...