Create Local Repository
-
Make sure you have "createrepo" command: "yum -qa|grep create", or install it with "yum install createrepo";
-
$ mkdir -p /mnt/iso/1
-
$ mount -o loop /home/chad/warez/CentOS-6.4-x86_64-LiveDVD.iso /mnt/iso/1
-
$ cd /mnt/iso
-
$ createrepo .
-
$ yum clean all
-
$ vi /etc/yum.repos.d/iso.repo
[MyISORepo] name=MyISORepo baseurl=file:///mnt/iso enable=1
-
$ yum --disablerepo=* --enablerepo=MyISORepo install kvm
Remove Repository
-
Remove repository temporarily: modify "1" to "0" in /etc/yum.repos.d/iso.repo; or permanently: "rm -f /etc/yum.repos.d/iso.repo";
-
unmount DVD image: umount /mnt/iso/1
Ref:
Howto Setup yum repositories to update or install package from ISO CDROM Image