DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Setup Yum Repositories to Update or Install Package from ISO Image


Create Local Repository

  1. Make sure you have "createrepo" command: "yum -qa|grep create", or install it with "yum install createrepo";

  2. $ mkdir -p /mnt/iso/1

  3. $ mount -o loop /home/chad/warez/CentOS-6.4-x86_64-LiveDVD.iso /mnt/iso/1

  4. $ cd /mnt/iso

  5. $ createrepo .

  6. $ yum clean all

  7. $ vi /etc/yum.repos.d/iso.repo

    [MyISORepo] name=MyISORepo baseurl=file:///mnt/iso enable=1

  8. $ yum --disablerepo=* --enablerepo=MyISORepo install kvm

Remove Repository

  1. Remove repository temporarily: modify "1" to "0" in /etc/yum.repos.d/iso.repo; or permanently: "rm -f /etc/yum.repos.d/iso.repo";

  2. unmount DVD image: umount /mnt/iso/1

Ref:

Howto Setup yum repositories to update or install package from ISO CDROM Image



Published

Nov 5, 2013

Last Updated

Nov 5, 2013

Category

Tech

Tags

  • centos 25
  • iso 2
  • linux 158
  • repository 3
  • yum 2

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor