Thursday, December 6, 2012

Use RedHat Disk For Yum Repository

I wanted to use a REDHAT 6 install disk as a Yum Repository since I did not plan on registering the system I built for practice.   Specifically I wanted to install x windows and a desktop after building the server without them.


Mount the install dvd:
mkdir /mnt/rhel_disc  (use whatever you want but make sure it matches the config file below on the line named “baseurl”.)

mount /dev/cdrom /mnt/rhel_disc


Create the config file dvd.repo at /etc/yum.repos.d
and add these lines:

[base]
name=CDROM
baseurl=file:///mnt/rhel_disc/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Thats it, now yum away.

No comments:

Post a Comment