redhat mount iso as one yum repository

prepare redhat DVD iso

 rhel-server-6.4-x86_64-dvd.iso

mount

 cd /

 mkdir /mnt/rhel
 mount -o loop rhel-server-6.4-x86_64-dvd.iso /mnt/rhel

 cd /etc/yum.repo.d

Create one file with suffix .repo, the content is:

  [rhel-x86_64-server-6]
  name=rhel-x86_64-server-6
  baseurl=file:///mnt/rhel
  enabled=1
  gpgcheck=1
  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

   

原文地址:https://www.cnblogs.com/lpthread/p/3493171.html