Yum Setup from Dvd

Configuring yum repo using dvd

IT is the primary tool for getting, installing, deleting, querying, and managing Red Hat Enterprise Linux RPM software packages from official Red Hat software repositories, as well as other third-party repositories. Yum is used in Red Hat Enterprise Linux versions 5 and later. Versions of Red Hat Enterprise Linux 4 and earlier used up2date.

Yum-server is nothing but a collection of rpms under some sort of filesystem tree. And clients get access to those rpms by mentioning the path to rpms in a file that ends with .repo under /etc/yum.repos.d/, and the path goes in baseurl section.

Now lets setup server using dvd in few easy steps


mount cdrom

[root@httpserver ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@httpserver ~]# ls -l /mnt

After that go to /etc/yum.repos.d folder

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

Then you have to create a file name with .repo at the end and fill out the information given below including path of the folder where you have mounted the dvd. This file checks this file and know where to look for rpms or packages when using yum command

[root@httpserver yum.repos.d]vi media.repo
baseurl=file:///mnt/   #[path of thee iso folder]

After you have created the media.repo file , use the below listed command to clear old information in cache

[root@httpserver ~]yum clean all

Use the following  command to see if the repo you showed worked or not

[root@httpserver ~]yum repolist


[root@httpserver yum.repos.d]  yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id repo name status
epel Extra Packages for Enterprise Linux 6 - x86_64 11,326
media rhel6.5-repo 3,763
repolist: 15,089


Hope this works for you guys. Thanks and please leave comments.



Leave a Reply

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