If you cannot use yum to install updates
because your management server is not connected to the internet, you must create a local
repository using the proper Linux ISO distribution image.
Follow this procedure to set up a local yum
repository on your management server:
-
Download the applicable Linux ISO image (for example,
rhel-8.5-x86_64-dvd.iso) on a server with internet
access and copy the file to the management server.
-
Create a directory and mount the ISO image using the following commands:
mkdir /media/OSImage
mount -o loop filename.iso /media/OSImage
-
If the /etc/yum.repos.d directory contains an existing
repo file, rename the file extension or delete it.
-
Use a file editor to create the new repository file, as in this example using
vim:
vim /etc/yum.repos.d/local.repo
- Configure the yum repository by copying and pasting the following text into the file:
[dvd-baseos]
name=dvd-baseos
baseurl=file:///media/OSImage/BaseOS/
gpgcheck=0
enabled=1
[dvd-appstream]
name=dvd-appstream
baseurl=file:///media/OSImage/AppStream/
gpgcheck=0
enabled=1
-
Save the file.
You can now invoke the yum command as
needed to install packages.