Thursday, September 26, 2013

Adding RHEL6 installation DVD as yum repository

In building a RHEL6 VM (VMware Workstation), I wanted to define the install DVD ISO as a yum repository.


  • Mount the ISO through workstation as a DVD
  • Verify your path to the disk.  Easiest way... try right-clicking on the DVD desktop icon and select "Open in Terminal".  Use pwd to see the path.
  • Create the file /etc/yum.repos.d/dvd.repo
      [RHEL6-DVD-Server] 
      mediaid=xxxxxxxxxx.xxxxxx
      name=RHEL6 DVD Server
      baseurl=file:///media/RHEL_6.0\ x86_64\ Disc\ 1/Server
      enabled=1
      gpgcheck=1

  • Replace xxxxxxxxxx.xxxxxx with number in /path/to/DVD/.discinfo
      # cat /media/RHEL_6.0\ x86_64\ Disc\ 1/.discinfo
      1285193176.460470
      Red Hat Enterprise Linux 6.0
      x86_64
      1
  • rpm --import /path/to/DVD/RPM-GPG-KEY-redhat-release
      rpm --import /media/RHEL_6.0\ x86_64\ Disc\ 1/RPM-GPG-KEY-redhat-release

At this point, the yum repository should be visible and ready to use.  Try the following commands to confirm:
  • yum repolist
  • yum grouplist

No comments:

Post a Comment