sed -i s,/usr/share/rhn/,/usr/share/mrepo/rhn/,g /usr/bin/rhnget
Create the file /etc/mrepo.conf.d/rhel5-server.conf and configure a repository for RHEL5 i386 and x86_64:
[rhel5-server] name = Red Hat Server $release ($arch) release = 5 arch = i386 x86_64 metadata = repomd yum repoview ### ISO images iso = rhel-$release-server-$arch-disc?.iso ### Additional repositories ### Your mileage may vary, depending on your entitlements ### If you try any other channel than updates, you might also need to make sure you have the proper entitlements on RHN updates = rhns:///rhel-$arch-server-$release #fastrack = rhns:///rhel-$arch-server-fastrack-$release #supplementary = rhns:///rhel-$arch-server-supplementary-$release #virtualization = rhns:///rhel-$arch-server-vt-$release #rhn-tools = rhns:///rhn-tools-rhel-$arch-server-$release
If you get an error like: rhnget: “Unknown error that needs more debugging occured with channel rhel-i386-server-5. Skipping.\n'up2date'”
Make sure /etc/sysconfig/rhn/sources is not empty and has an “up2date default” line as a minimum.
# CentOS NOTE: This file is deprecated and no longer used, all system management # is now handled via yum, look at yum's configs to manage repositories etc # # up2date default # EOF
You might have an issue with the web server not being able to show you the files in the yum repository. This is not due to a missing FollowSymlinks in your Apache config, but due to SElinux enforcements. Verify this with a peek at your Apache error log at /var/log/httpd/error.log. If it's trying to tell you that the symlinks doesn't exist, then try this:
chcon -Rh --reference /var/www/html /var/www/mrepo
This has been documented in /usr/share/doc/mrepo*/docs/selinux.txt.
You may have the CentOS5 issue reported above, and may need to generate the up2date-uuid file.
# uuidgen
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX
The file /etc/sysconfig/rhn/up2date-uuid should read:
uuid[comment]=Universally Unique ID for this server rhnuuid=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
[rhel-debuginfo] name=Red Hat Enterprise Linux $releasever - $basearch - Debug baseurl=http://<your_mrepo_host>/mrepo/rhel-$basearch-server-$releasever enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-KEY-redhat-release
Yum update, yum install and other yum commands should work as you should be used to now.