fbpx

Solutions

Need to set up yum repository for locally-mounted DVD on Rocky Linux 8

by ,


We have by far the largest RPM repository with NGINX module packages and VMODs for Varnish. If you want to install NGINX, Varnish, and lots of useful performance/security software with smooth yum upgrades for production use, this is the repository for you.
Active subscription is required.

Operating System and Software

  • Rocky Linux 8

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 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.