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

   

posted on 2013-12-26 22:06  lpthread  阅读(273)  评论(0编辑  收藏  举报