[CentOS] yum setup help and extra repos including centosplus

Mon Jun 6 20:44:25 UTC 2005
Johnny Hughes <mailing-lists at hughesjr.com>

On Mon, 2005-06-06 at 12:44 -0700, Robert Hanson wrote:
> 
> -}From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On
> -}Behalf Of Maciej Zenczykowski
> -}Sent: Monday, June 06, 2005 12:02 PM
> -}To: CentOS mailing list
> -}Subject: Re: [CentOS] yum setup help and extra repos including centosplus
> -}
> -}the way I'd do it is keep centosplus disabled, and only enable it with a
> -}command line option when wanting to install/update something from
> -}centosplus
> -}
> 
> right, thanks.
> 
> what i mean is, where (in what config file(s)) do i put the excludes line
> and where? example
> 
> exclude=php* kernel* postfix* perl* http* whatever*
> 
If you are going to install a program (say kernel and kernel-devel) from
centosplus ... but you are _NOT_ going to install php5 or any of the
other programs in centosplus.

The best thing to do is this ...

Edit the file /etc/yum.repos.d/CentOS-Base.repo and go to the [base]
section and add this line somewhere under [base]:

exclude=kernel*

do the same for the [updates] section.  The purpose of these excludes is
so that future updates will not over write the kernel you will install
from centosplus.

Now in the [centosplus] section add the line:

includepkgs=kernel kernel-devel

You can then change the enabled in the [centosplus] section to:

enabled=1

With the includepkgs set, the only thing you can install from centosplus
is kernel and kernel-devel ...

Use yum to get the new kernel:

yum install kernel kernel-devel 

Let's say you also want to add the xfs tools to your system from
[centosplus].  There is nothing to exclude (we don;t have these packages
in base / updates), so you just need to add the packages to the
includepkgs in the [centosplus] section, like this:

includepkgs=kernel kernel-devel xfsdump xfsprogs* dmapi*

Now you can do:

yum install xfsdump xfsprogs dmapi

The good thing about enabling [centosplus] and putting in the excludes
in update and base and the includepkgs in centosplus is that if updates
are done to centosplus and you run "yum update" (or "yum upgrade") you
will get your updates, but not have things overwritten.

> so that i do not have to remember to "exclude" on the command line when i do
> a
> 
> yum --enablerepo=centosplus install kernel
> 
> do i put that at the top of the file in /etc/yum.conf of do i put it at the
> top of the /etc/yum.repo.d/CentOS-Base.repo or ?
> 
> regards and thanks!
> 
>  - rh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.centos.org/pipermail/centos/attachments/20050606/bbcf2e3a/attachment-0005.sig>