Archive for the tag 'Repos'

How to protect one Yum repo’s packages from being replaced by packages from another source?

If we use two different repositories, each holding a different version of the same package, only the latest of the two will be installed if you use yum to update that package. This can lead to problems if the third party repository contains a newer version of a core system package than the Red Hat repository.

The yum-protectbase plugin will protect files of the base repository from being replaced by packages from a third party repository.

To install the plugin, use this command:

yum install yum-protectbase

This will install the plugin and its basic configuration file, /etc/yum/pluginconf.d/protectbase.conf

Setting are stored under /etc/yum/pluginconf.d/rhnplugin.conf with a section name matching the repo.id of the channel. You need to add :

protect = yes

To protect a different repository, go to its configuration file in /etc/yum.repos.d/repository.repo and add this line to its configuration

/etc/yum.repos.d/repository.repo

Add

[repository]

protect = 1

You will need to add this for each repository which needs to be protected.

SBDavid

Creating Repos for RHEL / Centos

Creating Repos for RHEL / Centos

Please follow the given steps to setup a repos on the local server. Make sure that you have installed rpm createrepo, You can download the required rpm for your os from:

http://dag.wieers.com/packages/createrepo/

# mkdir -p /repos/os

Copy all the rpm from all redhat cd to this directory.

# mkdir /repos/updates

# createrepo /repos/os

# createrepo /repos/updates

After doing this you just need to run the ensim installer in the following way.

# sh ensim-installer.sh –email=you@youremail.com –cdrom=n -o file:///repos/os -u file:///repos/updates