5

I plan to have a few servers installed with RHEL, but the servers will not have Internet connection.

Is it possible to update RHEL servers without Internet connection?

Can I download the updated RPM packages from RHN and install them manually on the servers?

3
  • short answer: yes, you can. Might want to use yum local install to install the packages to sort the dependencies.
    – Sirex
    Jan 4, 2011 at 8:34
  • Where can I download the packages?
    – kjloh
    Jan 5, 2011 at 1:48
  • You get the downloads from RHN. You have to sign in with your account.
    – Christian
    Jan 5, 2011 at 6:51

3 Answers 3

3

A usual setup would be a proxy which downloads the updates from Red Hat and provides them to your local servers. This way only one server has to be connected to the internet. Your question is not clear, whether there is generally no internet access or only the mentioned servers are not allowed to access the internet.

Some proxy solutions also allow to download the patches with your desktop PC or whatever, put them on a proxy server and then publish them to your local network.

The Red Hat specific products are spacewalk and the Red Hat Network commercial products. This page has also some more explanations about the topic.

This is easier and more scalable as installing it manually on each server.

You could also search serverfault for patch management, spacewalk, rhel updates and get some more info on the topic.

EDIT:
Found this in another forum:
To update packages to a system without Internet connectivity, you need to download the ISO and then mount it locally. To download iso's, please check below given steps:

  1. Log into your RHN account.

  2. select your desired channel under the "Channels" tab.

  3. then click "Easy ISOs" on the left or the "Download" link inside your selected channel.

  4. For details, please follow the below kbase, http://kbase.redhat.com/faq/FAQ_58_1500.shtm http://kbase.redhat.com/faq/FAQ_80_594.shtm

Once you download the iso's, follow the below given steps:

  1. Create directories to mount the iso file. mkdir -p /cdrom/iso

  2. Mount the iso as loopback device. mount -o loop <iso-name> /cdrom/iso Replace with the iso file.

  3. Create a repository. The createrepo package needs to be installed on the system in order to run the following commands. createrepo is an optional package and is not installed by default.

    cd /cdrom
    createrepo .
    yum clean all

  4. Create a file /etc/yum.repos.d/file.repo as follows:

    cat /etc/yum.repos.d/file.repo
    [RHEL 5 Repository]
    baseurl=file:///cdrom
    enabled=1

Running yum should now work with the iso file as the source.

For details, please check following kbase, http://kbase.redhat.com/faq/FAQ_103_10415.shtm (as archived by Wayback machine).

Let us know if you have any further queries.

2
  • Just to clarify, the servers are not allowed to access the Internet at all. So, I cannot do update using yum.
    – kjloh
    Jan 5, 2011 at 1:28
  • Take a look at my additions to my answer. This might help you, as it is a way to install the updates with no internet connection.
    – Christian
    Jan 5, 2011 at 12:48
4

I answered this similar question on Stack Overflow. This is how I update offline machines.

I used to work on DOE classified systems that could never touch the public internet. There is a very easy way to do this as mentioned. Just use the ISO as a repo, and for my example to work, it needs to be a DVD image. (The way around that using disk {1,2,3} is to copy the files from each disk onto the local disk or a storage device)

You will need to install createrepo which for me involved two dependencies.

createrepo
deltarpm
python-deltarpm   

mkdir -p /mnt/iso/rhel54
mount -o loop /path/to/rhel5.4.iso /mnt/iso/rhel54
cd /mnt/iso
createrepo .

It will look like this: [root@hostname iso]# createrepo .

44/20586 - rhel54/HighAvailability/Packages/PyQt4-4.6.2-8.el6.x86_64.rpm

Create /etc/yum.repos.d/shane.repo and add 

[shane-repo]
baseurl=file:///mnt/iso/
enabled=1
gpgcheck=0

Then run yum update
1

yum update doesn't always pull the repo immediately. I have had to use rhn_register if you have no internet connection, and if you do have an internet connection you can use rhn_check instead in certain cases to draw from the newly create local cdrom repo.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .