Download  FAQ  Wiki
Site Navigation:

Using Fedora Legacy's yum 2.x for Red Hat Linux 8

yum (Yell dog Updater, Modified) is an automated package management program which may be used to install, remove, and update packages on an RPM based system. It will help you to keep your system up to date and is used by Fedora Core, the successor to Red Hat Linux. Unfortunately, it wasn't included in original release of Red Hat Linux 8, however, we have prepared a yum package for you to get the full yum functionality on your existing Red Hat Linux 8 system.

NOTE: The Fedora Legacy yum 2.x program for Red Hat Linux 8 has not yet been completed. The instructions below cover installing the freshrpms.net version of yum. When the Fedora Legacy version is released, these instructions will be updated to reflect that fact.

Step 1: Preliminaries

Linux prevents ordinary users from installing, removing, or modifying system software, libraries, and important configuration information. So you must have root access to proceed. You may either login as the root user, or use the su (or sudo) commands to become the root user on the machine.

Note: Be careful when running as root! Be sure to logout of the root account as soon as you are done. Running as root is dangerous, and should only be used when needed. Typos or mistakes can destroy your system or your data, so it is important that you be careful when running as root.

When you are running as root, your prompt will be changed to the # character. In the command examples below, we include this prompt, however you should not type the # character when entering a command!

Yum 2.x uses a newer version of RPM than ships with Red Hat 8. In fact, the Red Hat 8 version of RPM is very buggy. It also depends on a few other packages which may either not be installed, or not up to date, on your system. In order to use yum 2.x on Red Hat 8, you will need to upgrade your RPM and RPM/yum dependent packages by executing the following very long command as root:

# rpm -Uvh http://download.fedoralegacy.org/redhat/8.0/legacy-utils/i386/rpm-4.1.1-1.8x.i386.rpm \ http://download.fedoralegacy.org/redhat/8.0/legacy-utils/i386/rpm-build-4.1.1-1.8x.i386.rpm \ http://download.fedoralegacy.org/redhat/8.0/legacy-utils/i386/rpm-devel-4.1.1-1.8x.i386.rpm \ http://download.fedoralegacy.org/redhat/8.0/legacy-utils/i386/rpm-python-4.1.1-1.8x.i386.rpm \ http://download.fedoralegacy.org/redhat/8.0/legacy-utils/i386/popt-1.7.1-1.8x.i386.rpm \ http://download.fedoralegacy.org/redhat/8.0/updates/i386/gnupg-1.0.7-14.i386.rpm

The above may seem like a lot of work, but don't worry; you only have to do this once, and after that you'll never need to worry about using rpm commands again to update your installed packages. Once installed, yum will automatically retrieve and install the newest required updates along with all their dependencies in a single call. The work involved in setting up yum is small compared to the amount of work it will save you in the future!

Step 2: Install yum

To install yum, use the following command as the root user on your machine:

# rpm -ivh http://ftp.freshrpms.net/pub/freshrpms/redhat/8.0/yum/yum-2.0.3-5.rh.fr.i386.rpm

Step 2.1: Configure yum

Yum uses the file /etc/yum.conf to decide where to download updates from. This file needs to be configured to work with the Fedora Legacy repositories. Edit or create your /etc/yum.conf file to read as follows:

# See the yum.conf(5) man page for information the syntax of this file,
# including failover setup.

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
exclude=kernel*

[base]
name=Red Hat Linux $releasever - $basearch - Base
baseurl=http://download.fedora.us/fedora/redhat/$releasever/$basearch/yum/os/
gpgcheck=1

[updates]
name=Red Hat Linux $releasever - $basearch - updates
baseurl=http://download.fedora.us/fedora/redhat/$releasever/$basearch/yum/updates/
gpgcheck=1

Step 2.2: Add the GPG keys to root's keyring

All Fedora Legacy packages are signed with GPG keys. All packages should be verified using these keys. See http://www.fedoralegacy.org/about/security.php for more information.

In order to properly verify the packages, you need to add the appropriate PGP keys to your system. To import the keys, use the following command as the root user:

# rpm --import http://www.fedoralegacy.org/FEDORA-LEGACY-GPG-KEY

Step 3: Update your system

Once you have installed the yum package, you should run the following command as the root user on your system to update your system:

# yum update

This command will first check for and download any new update headers (header files contain information about packages, including dependency information) to your system's yum cache, and check if any updates are available for packages already installed on your system. If no updates are available for your system, it will display messages to that effect and exit. If updates are available for your system, it will calculate which packages are needed, including any packages needed to resolve dependencies, and present this list to you. At this point, it will ask you if you want to proceed, by prompting you with the question:


Is this ok [y/N]:

Answer with "y" (followed by the Enter key) to proceed with the updates, or "n" (followed by the Enter key) to abort the updates. (Note that the default reply is "n", so that simply pressing the Enter key without entering "y" will be the same as entering "n").

If you answer "y" then yum will download all the actual RPM packages needed to your system's yum cache, check for sufficient disk space to install the updates, and then apply them to your system. (If you answer "n", nothing will be done).

Warning: This may take some time on your first use of yum, depending on how up to date your system is and the speed of your internet connection!

Step 4: Decide if you want automatic updates

yum has the ability to automatically apply (download/verify/install) all updates to your system, but this feature is disabled by default. Please refer to this autoupdates discussion to see if automatic updates are right for you, and additional information about automatic updates. If you want to enable that functionality, please enter the following command as the root user on your system:

# chkconfig yum on
# service yum start

After typing the last line, you should see a message on the screen confirming that nightly updates are now enabled. After that, yum will update your system through the cron job /etc/cron.daily/yum.cron, which will run every night (or later through anacron, if your system isn't running all the time).

Please note that the above depends on a working cron setup on your machine! You can check the cron log file /var/log/cron to verify it is working. There should be at least one hourly entry each hour, and one daily entry each day.

You can check what yum updates are being done by looking at the yum log file var/log/yum.log for recent entries.

Step 5: Subscribe to fedora-legacy-announce

You may subscribe to the fedora-legacy-announce mailing list to be informed by e-mail when new updates become available. This step is optional, but highly recommended.

Step 6: Please help us with our service!

The Fedora Legacy project is always in the need of helping hands. Please check the Participate section of our website to see what you can do to help us. As we're a community project, our success will heavily depend on helping hands – possibly you!

If you find a problem with an update published by The Fedora Legacy Project, or in The Fedora Legacy Project documentation, please let us know!

Step 7: Optionally learn additional features of yum

Below is a summary of some of the more advanced features of yum for those who wish to know more. You do not need to know these commands to keep your system updated; they are simply provided for those who want to learn more about using yum to its fullest.

yum list
List all available software.
yum check-update
See if there are updated packages available.
yum update
Update all installed packages that have a newer version available.
yum install <packagename>
Install specific package(s) (and its dependencies, if missing any).
yum search <word>
Search all known packages entries (descriptions etc) for <word>.
yum info <packagename>
Show basic information about a package.