Redirected from page "Repositories/CentOSPlus"

Clear message

The CentOSPlus Repository

1. What is the CentOSPlus repository?

The CentOSPlus repository contains packages that are upgrades to the packages in the CentOS base + CentOS updates repositories. These packages are not part of the upstream distribution and extend CentOS's functionality at the expense of upstream compatibility. Enabling this repository makes CentOS different from upstream. You should understand the implications of this prior to enabling CentOSPlus. You can browse the CentOSPlus directory for CentOS 5 or CentOS 6 on our mirrors for the architecture you intend to use.

The CentOSPlus repository contains a group of packages, all of which are updates. You probably do not want to enable CentOSPlus as a whole, but instead want to pick the exact packages that you want to use.

Prior to enabling the CentOSPlus repository you should read about the includepkgs= and/or exclude= options in yum. To read about these options use this command at the command line:

man yum.conf

2. Enabling the CentOSPlus repository

To enable the CentOSPlus repository, edit the file /etc/yum.repos.d/CentOS-Base.repo and look for the [centosplus] section. Here is how it looks by default:

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5  <== -CentOS-6 in CentOS-6


Example 1: We want the new CentOSPlus postfix with mysql_pgsql support. Here is how to setup /etc/yum.repos.d/CentOS-Base.repo:

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
includepkgs=postfix-*
exclude=postfix-*plus*

You would also want to add this to both the [base] and [update] sections of /etc/yum.repos.d/CentOS-Base.repo, so as not to get postfix packages from there anymore:

exclude=postfix-*


Example 2: We want to use CentOSPlus kernel to be able to use the jfs or reiserfs file system and the creation tools. We would edit /etc/yum.repos.d/CentOS-Base.repo and modify the following in the [centosplus] section:

enabled=1
includepkgs=kernel* jfsutils reiserfs-utils

In the [base] and [update] section you would do the following:

exclude=kernel kernel-devel kernel-PAE-*


3. yum-plugin-priorities

Another way to protect your system from updates from the CentOSPlus repository is to use the yum-plugin-priorities plugin. This is the recommended method. Follow the instructions shown in the link and set up yum-plugin-priorites. Edit /etc/yum.conf and add this line:

plugins=1

You would set priorities in /etc/yum.repos.d/CentOS-Base.repo like this:

[base]
exclude=foo bar
priority=1

[update]
exclude=foo bar
priority=1

[centosplus]
enable=1
priority=2

This will make the [base] and [update] repositories have higher priority over the [centosplus] repository, so the only items in CentOSPlus that will update either [base] or [update] are items that are excluded from those repositories with an exclude= setting.

Therefore, using yum-plugin-priorities allows you to skip setting up the includepkgs= for the [centosplus] section of CentOS-Base.repo, but it still only allows updates of packages that you exclude= from the [base] and [update] repositories.


4. Summary

Using the CentOSPlus repository is more dangerous than using other CentOS repositories, as it is designed to have several updated packages and it is not really designed to be completely enabled.

You can use all the packages in CentOSPlus, but normally one will pick only the packages they are looking for and use exclude= and includepkgs= (or exclude= and yum-plugin-priorities) to load only those packages from the CentOSPlus repository.

Please ensure that you understand all these concepts before you use the CentOSPlus repository.

AdditionalResources/Repositories/CentOSPlus (last edited 2012-04-12 21:45:38 by AkemiYagi)