Yum repository is very important and they help us in installing required RPM from vendor websites or even local repo. You will be surprised to know that a major part of RHEL 7 operating system DVD are RPM’s and if you make a local repo for configuring yum repo, it will take large space on your hard disk. So the solution is to configure yum repo using CD/DVD ROM and this tutorial focus on same.
So, if you have space crunch on your Linux machine, using YUM repo through CD/DVD ROM is a good option.
Configuring Yum Repo using CD/DVD Rom in RHEL 7/CentOS 7
This method is easy and good for students preparing for RHCSA and RHCE exam. Students can set up practice LAB and can do this configuration and this can practice on minimum hard disk requirement.
If you also want to see this tutorial in action, then please watch below the video. It will show you how easily you can configure Yum Repo using CR ROM in RHEL7 or CentOS 7.
1. Firstly, go to virtual machine setting and add your CD/DVD ROM, like shown below. You can do this for all the VM’s where you want to configure YUM repo through CD/DVD ROM.
2. Make a directory to mount your CD/DVD ROM and mount it under that DIR.
# mkdir /cdrom # mount /dev/cdrom /cdrom
3. Now make configuration file for your YUM repo for installing packages from CD/DVD ROM. Use below commands. Delete all other repo files under folder /etc/yum.repos.d/
# vi /etc/yum.repos.d/cdrom.repo
Insert below lines on the file.
[cdrom] name=CDROM Repo baseurl=file:///cdrom gpgcheck=0
4. Enter below command to check packages in repo.
# yum repolist
Now, your yum repo using CD/DVD ROM is configured, verify it by installing some packages.
Hope this tutorial on configuring yum repository with CD ROM will help you and if you have any problem or question regarding this, please use below comment form or directly send email to me. If you like the tutorial do not forget to share it.