top of page
Recent Posts

How to configure YUM to install package from RHEL8.2 DVD repository

Updated: Oct 3, 2021

Document ID: RHEL005

In my previous post I've discussed about software package installation procedure using rpm command. In this post we will discuss package installation using yum.

Previous post how to install software package using rpm

yum : rpm command can be used to install and upgrade software package but it is not designed to work with package repositories or resolve dependencies, to resolve dependencies we use yum.

We can use yum command which has capability to resolve dependency requirement.

To use DVD ROM repository in yum command we have to complete below steps.

Step1: Unmount DVD (if it is mounted) and mount it again using loop option.

[root@RHEL82 Packages]# cd ~

[root@RHEL82 ~]# umount /media

[root@RHEL82 ~]# mount -o loop /dev/sr0 /media/

[/dev/sr0 or it may be /dev/sr1, we can use /dev/sr then press “tab” key to check available devices name]

Now, DVD has mounted in /media directory, check with #mount command


Step2: Go to /etc/yum.repos.d/

[root@RHEL82 ~]# cd /etc/yum.repos.d/

[root@RHEL82 yum.repos.d]# ls


[root@RHEL82 yum.repos.d]#pwd


Step3: Create a local repo file "/etc/yum.repos.d/dvd.repo" with below content

[root@RHEL82 yum.repos.d]# vim dvd.repo

It wll open a blank file press “i” [insert mode]copy and paste below text














[save & exit]


[root@RHEL82 yum.repos.d]# yum clean all

Updating Subscription Management repositories.

Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

0 files removed

[root@RHEL82 yum.repos.d]# yum repolist

You can see DVD-Apstream & DVD-BaseOS repo created and enabled

Step5: install “httpd” package using yum command

root@RHEL82 yum.repos.d]# yum install httpd