Friday, June 11, 2010

Before using third party repositories on Centos

Before configuring and installing anything from third party repo, it is recommended to make sure to use Priorities by installing yum-priorities package for your version of Centos

CentOS-4 or CentOS-6:
# yum install yum-plugin-priorities

CentOS-5:
# yum install yum-priorities

After the plugin is installed, make sure that it is enabled when you decide to use a given archive. You can do this by editing the /etc/yum/pluginconf.d/priorities.conf file, and ensuring that it contains the following lines:

[main]
enabled=1
check_obsoletes=1

Set the priorities of Repositories

With the plugin enabled, you may add priorities to repositories by adding the line:

priority=N

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. Usually, it is best to give at least the CentOS base and update repositories a very high priority.

Give CentOS base,update,addons,extras repositories the highest possible priority (1):

vi /etc/yum.repos.d/CentOS-Base.repo
priority=1

And give centosplus, and contrib priority 2
priority=2

Give low priority = 10 to all the third party repositories by setting repos files in /etc/yum.conf.d directory

For detail refer to the Centos wiki

No comments:

Post a Comment