Tuesday 9 June 2015

Add CDROM as local yum repo - CentOS 7

Mount the CD/DVD ROM on the any directory of your wish, for testing mount it on /cdrom.
# mkdir /cdrom
# mount /dev/cdrom /cdrom
Configuration file: Create the new repo file called cdrom.repo under /etc/yum.repos.d directory. # vi /etc/yum.repos.d/local.repo Add the following details.
[LocalRepo]
name=Local Repository
baseurl=file:///cdrom
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7