Friday, November 18, 2016

Create CDROM as yum repository

12:25 PM Posted by Dilli Raj Maharjan No comments

Mount cdrom

mount /dev/sr0 /mnt







Copy repos file from cdrom to the /etc/yum.repos.d directory and change the permission of the repos file.

cp /mnt/media.repo /etc/yum.repos.d/OEL6.3dvd.repo
chmod 644 /etc/yum.repos.d/OEL6.3dvd.repo



List the content ot the repos file

cat /etc/yum.repos.d/OEL6.3dvd.repo


Change gpgcheck to 1 and add following lines and verify the latest content of repos file
cat /etc/yum.repos.d/OEL6.3dvd.repo

baseurl=file:///mnt/
gpgpkey=file:///mnt/RPM-GPG-KEY



Import public key defined on the gpgpkey's value

rpm --import /mnt/RPM-GPG-KEY



Remove public-yum-ol6.repo

rm  public-yum-ol6.repo


Clear all the yum contents

yum clean all





List the current repo on the system.

yum repolist



Verify newly created yum repos by adding a package

yum -y install mc

0 comments:

Post a Comment