[tools] Redhat Client Config with MREPO
John Scherff
JScherff at 24hourfit.com
Mon Mar 19 21:35:16 CET 2007
Here's a start for the client-configuration.txt document:
1. RHEL3 AND RHEL4 CLIENTS:
1.1. Comment-out the line 'up2date default' in the
/etc/sysconfig/rhn/sources file
1.2. Add the following lines to /etc/sysconfig/rhn/sources (one line for
each channel) to instruct up2date to use the internal repository server
(mrepo) instead of RHN. For example, assume you have configured mrepo to
mount the ISO images for RHEL4AS and to mirror the channels
rhel-i386-es-4 and rhel-i386-es-4-extras. The /etc/sysconfig/rhn/sources
file on the RHN client would look something like this (assuming the
mrepo servername is 'mrepo.abc.com' and you set up mrepo using the
defaults):
# up2date default <- removed for mrepo
# other comments ...
yum base http://mrepo.abc.com/mrepo/rhel4es-$ARCH/RPMS.os/
yum updates http://mrepo.abc.com/mrepo/rhel4es-$ARCH/RPMS.updates/
yum extras http://mrepo.abc.com/mrepo/rhel4es-$ARCH/RPMS.extras/
1.3. The corresponding mrepo configuration (rhel4es section) would look
something like this:
[rhel4es]
name = Red Hat Enterprise Server $release U4 ($arch)
release = 4
rhnrelease = 4ES
arch = i386
metadata = repomd yum
iso = RHEL$release-U4-$arch-ES-disc?.iso
updates = rhns:///rhel-$arch-es-$release
extras = rhns:///rhel-$arch-es-$release-extras
1.4. Optionally, clear out the up2date cache with 'rm -fr
/var/spool/up2date'
2. RHEL5 CLIENTS
2.1. Edit /etc/yum/pluginconf.d/rhnplugin.conf and change the parameter
'enabled = 1' to 'enabled = 0'
2.2. Add a 'repo' file (e.g., 'internal-mirror.repo' to the
/etc/yum.repos.d directory. The file should contain one section per
channel and should look similar to the following:
[base]
name=Red Hat Enterprise Linux $releasever - $basearch - base
baseurl=http://mrepo.abc.com/mrepo/rhel5es-$basearch/RPMS.os
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[updates]
name=Red Hat Enterprise Linux $releasever - $basearch - updates
baseurl=http://mrepo.abc.com/mrepo/rhel5es-$basearch/RPMS.updates
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[virtualization]
name=Red Hat Enterprise Linux $releasever - $basearch - virtualization
baseurl=http://mrepo.abc.com/mrepo/rhel5es-$basearch/RPMS.virtualization
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
2.3. The corresponding mrepo configuration (rhel5es section) would look
something like this:
[rhel5es]
name = Red Hat Enterprise Server $release U1 ($arch)
release = 5
rhnrelease = 5Server
arch = i386
metadata = repomd yum
iso = rhel-$release-server-$arch-disc?.iso
updates = rhns:///rhel-$arch-server-$release
fastrack = rhns:///rhel-$arch-server-fastrack-$release
virtualization = rhns:///rhel-$arch-server-vt-$release
3. NOTES:
3.1. The mrepo configuration must mirror AT LEAST the same channels the
client is subscribing to.
3.2. You can mirror more channels than the client subscribes to without
impacting the client. The client's channel subscriptions are controlled
by its /etc/sysconfig/rhn/sources file (for RHEL3 and RHEL4) and by its
*.repo configuration files in /etc/yum.repos.d (for RHEL5).
3.3. Once an RHN client is pointing to mrepo for updates, the
/etc/sysconfig/rhn/systemid file is not required. The server no longer
checks in with RHN and mrepo does not manage entitlements.
3.4. Do not be confused by the 'yum' prefix in
/etc/sysconfig/rhn/sources (RHEL3 and RHEL4 configs), you do not need
'yum' installed for this to work.
3.5. You will probably have to schedule a cron job to automatically
schedule updates on RHEL3 and RHEL4 systems. E.g., '0 0 * * *
up2date-nox -u'.
3.6. On RHEL5 systems, you can configure automatic updates via cron (...
yum -y update), or you can edit the file /etc/yum/yum-updatesd.conf and
set the parameters 'do_update', 'do_download', and 'do_download_deps' to
'yes'.
3.7. SETTING UP MREPO AND CONFIGURING RHEL SYSTEMS TO USE IT DOES NOT
LEGALLY RELIEVE YOU OF THE REQUIREMENT TO PURCHASE ENTITLEMENT
SUBSCRIPTIONS FROM RED HAT TO OBTAIN UPDATES - EVEN IF THE SYSTEMS ARE
NON-PRODUCTION, FOR PERSONAL USE, FOR EVALUATION PURPOSES, FOR
EDUCATIONAL PURPOSES, TO PREPARE FOR A RED HAT EXAM, OR FOR ANY OTHER
PURPOSE PEOPLE COME UP WITH TO AVOID PAYING FOR SOMEONE ELSE'S
INTELLECTUAL PROPERTY. (RED HAT SELLS DISCOUNTED '5-PACK' ENTITLEMENT
SUBSCRIPTIONS FOR TEST/DEVEVELOPMENT SYSTEMS AND PROVIDES STUDENT
DISCOUNTS FOR EDUCATIONAL INSTALLATIONS.) THE INTENT OF MREPO IS TO
REDUCE UPDATE LATENCY AND POINT-OF-PRESENCE BANDWITH UTILIZATION BY
PROVIDING A LOCAL REPOSITORY WITHIN YOUR HIGH-SPEED INTRANET. IF YOUR
AIM IS TO USE RED HAT LINUX WITHOUT PAYING FOR ENTITLEMENTS, SWITCH TO
CENTOS (WWW.CENTOS.ORG). YOU CAN EASILY CONVERT A RHEL SYSTEM TO ITS
CENTOS EQUIVALENT WITHOUT RE-INSTALLING.
John Scherff
CISSP CISA RHCE MCSE CCNA Blah Blah Blah
Sr. IT Security Engineer
24 Hour Fitness
-----Original Message-----
From: tools-bounces at lists.rpmforge.net
[mailto:tools-bounces at lists.rpmforge.net] On Behalf Of Dag Wieers
Sent: Monday, March 19, 2007 2:20 AM
To: Camron W. Fox
Cc: tools at lists.rpmforge.net
Subject: Re: [tools] Redhat Client Config with MREPO
On Mon, 12 Mar 2007, Camron W. Fox wrote:
> Is there a doc for configuring a Redhat client for using mrepo
with
> up2date? I notice that
> /usr/share/doc/mrepo-0.8.4/docs/client-configuration.txt is emtpy.
It is empty as a placeholder hoping someone would contribute to it.
Feel free to provide me with details and problems you encountered that
deserve to be clarified. I'm way too experienced to create good
documentation, so please send me feedback.
Kind regards,
-- dag wieers, dag at wieers.com, http://dag.wieers.com/ --
[all I want is a warm bed and a kind word and unlimited power]
_______________________________________________
tools mailing list
tools at lists.rpmforge.net
http://lists.rpmforge.net/mailman/listinfo/tools
More information about the tools
mailing list