Set up yum repository for locally-mounted DVD on Red Hat Enterprise Linux 8

RedHat Enterprise Linux 8 changes the way packages are delivered by splitting the main repository that was available on RedHat 7 systems to the below two (link with more information is attached at the bottom of the article)

  • BaseOS
  • AppStream

As a result when you locally mount a DVD to be used as a repository for packages one should create now two repositories instead of one.

Attach dvd to virtual server, mount directory and create repositories on /etc/yum.repos.d

 mkdir -p  /mnt/disc
 mount /dev/sr0  /mnt/disc

Create repository files

cd /etc/yum.repos.d
touch appstream.repo baseos.repo

Change permissions to repository files to 0644

chmod 644 appstream.repo baseos.repo

AppStream

[AppStream]
name=Red Hat Enterprise Linux 8.2.0 AppStream
gpgcheck=0
enabled=1
baseurl=file:///mnt/disc/AppStream

BaseOS

[BaseOs]
name=Red Hat Enterprise Linux 8.2.0 BaseOS
gpgcheck=0
enabled=1
baseurl=file:///mnt/disc/BaseOS

Validate that both repos are enabled

repositories enabled

Find below the procedure documented from RedHat for Linux 7

https://access.redhat.com/solutions/1355683

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index

Leave a Reply

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

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