I have about 50 licenses for Red Hat in my network, so as you can already guess, updating all the machines is a huge pain. I’m not sure why Red Hat can’t have a mirror geographically closer to Singapore, like in Australia or Hong Kong, or even better still, in Singapore.
Red Hat Satellite is one solution for aggregating the updates. I tried haggling with my Red Hat sales person for a free license, but she was quite straightforward in rejecting me.
Well, there’s always an open source alternative other than the official paid version.
In my infrastructure, I make use of Cobbler to kickstart all my machines. It is not only for initial installation, but also for disaster recovery. In the event of a failure, I will just need to replace the machine and kickstart via Cobbler. Network installation for Red Hat takes about 5 mins. Restoring my last backup from disk archives takes another 15 mins. I’m very convinced that this is way faster than any traditional backup solution.
Anyway, back to the update portion. Since Cobbler is a provisioning system, it is able to make a local repository remote yum repositories. My repository has Red Hat 5/6, CentOS 5/6 and Extra Packages for Enterprise Linux (EPEL).
I won’t going into installing Cobbler. There are a lot of howtos out there. Let me hop straight into the mirroring of RHN updates.
From now on, I’m assuming you have Cobbler all set and running:
On the Cobbler Server
1. First thing, the machine that’s running Cobbler has to be subscribed to the channels that you are going to mirror. Here comes the caveat. Suppose you are running RHEL6 on the Cobbler machine, you can only mirror RHEL6
2. Check the channels that your cobbler machine is subscribed to.
[[email protected]> rhn-channel –list
3. Add the repositories to Cobbler
[email protected]> cobbler repo add rhn://rhel-x86_64-server-6 –name rhel-x86_64-server-6
4. Start the cobbler sync manually to mirror the repository
[email protected]> cobbler reposync –only=rhel-x86_64-server-6
On the Cobbler Clients
1. Disable RHN. Because the repo name we use in Cobbler is the same as the actual RedHat channel, we need to disable RHN or there will be a conflict when you do a yum update.
[email protected]> vi /etc/yum/pluginconf.d/rhnplugin.conf
enabled = 0
gpgcheck = 1
Set enabled = 0
2. Add your brand new RHEL yum repo in your /etc/yum.conf or /etc/yum.repos.d/
3. yum update and you will see that you are updating from your local repo.
That’s it folks! It’s not difficult. And you will find updating RedHat less painful.