Operating System and Software
Problem
- How to set up yum repository to use locally-mounted DVD with Rocky Linux 8 ?
- Would like to upgrade server from Rocky Linux 8.x to Rocky Linux 8.y
- Have a secure environment that will never be connected to the internet, but still needs to be updated
- Is there a way to update the packages on server, with no satellite server and servers disconnected from internet
- How to apply offline patches for Red Hat systems using Binary DVD ISO ?
- How do I create a local repository in Rocky Linux 8?
How to Fix
-
Download the ‘Rocky Linux 8.3 Binary DVD’ from the Customer Portal which is having a size of approximately 7GB+
-
Mount the RHEL Binary DVD ISO to a directory such as /mnt/disc, e.g.:
# mkdir -p /mnt/disc
# mount -o loop rhel-8.x-x86_64-dvd.iso /mnt/disc
- If you use DVD media , you can mount it as follows,
# mkdir -p /mnt/disc
# mount /dev/sr0 /mnt/disc
- Create the repository file with the correct path where the DVD or ISO is mounted,
# vi /etc/yum.repos.d/rhel8dvd.repo
[BaseOS]
name=BaseOS Packages Rocky Linux 8
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///mnt/disc/BaseOS/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[AppStream]
name=AppStream Packages Rocky Linux 8
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///mnt/disc/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
- Clear the cache and check whether you are able to get the packages from this DVD repository,
# yum clean all
# yum repolist
- If are no errors, then you can consider Installing/Updating the Packages with,
# yum install <Package-Name>
# yum check-update
# yum update