Avoid Package Conflicts with Yum Priorities

Its always best to install packages from the vendor's original repositories before installing from third party repositories like RPMForge. Installing from different repositories can result in package conflicts between RPMForge and CentOS Updates repository. To avoid this, we should use the “yum-priorities” plugin.

The Yum Priorities plugin can be used to enforce ordered protection of repositories, by associating priorities to repositories. Visit the Yum Priorities CentOS Wiki for more information.

Install Yum Priorities

  1. Run the Yum Priorities install command
yum install yum-priorities

Configure Yum Priorities

  1. Open the Yum Priorities configuration file
    1. Ensure that it is enabled. Check if the following lines exists:
    2. Save and close the file
  2. With the plugin enabled, you add priorities to repositories by adding the line priority=N to a repository entry, where N is an integer from 1 to 99. The default priority for repositories is 99. The repositories with the lowest numerical priority number have the highest priority. Open the CentOS base repository configuration file
    1. Usually, it is best to give at least the CentOS repositories a very high priority(1). Add the following text to the end of the Base, Updates, Addons, and Extras repository entries:
    2. Add the following text to the end of the CentOSPlus repository entry*
      A repository entry is specified with the repository name placed between [ and ] (e.g. the base repository entry is specified with [base]).

No comments:

Post a Comment