Setup Yum from Iso

If you have iso file then mount the iso to a folder using command below

[root@httpserver ~]# mount -o loop /root/rhel /mnt

After that check the folder if the iso has mounted or not, if it is mounted then it should show the packages  when you check using ls /mnt

[root@httpserver ~]#ls /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

/mnt is the path of the folder where iso is mounted

After you have created the media.repo file , use yum clean all command to clear old information in yum

[root@httpserver ~]yum clean all

Use yum repolist 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  
iso-repo              rhel6.5-repo                                                3,763
repolist: 15,089
[root@bijankoserver yum.repos.d]#



Leave a Reply

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