# vi /etc/yum.repos.d/centos.repo
[centos]
name=CentOS-7
baseurl=http://ftp.heanet.ie/pub/centos/7/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://ftp.heanet.ie/pub/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
# yum repolist
=========== Another edition
mount /dev/sr0 /mnt/cdrom
# cp /mnt/cdrom/media.repo /etc/yum.repos.d/rhel7dvd.repo
# chmod 644 /etc/yum.repos.d/rhel7dvd.repo
# vi /etc/yum.repos.d/rhel7dvd.repo (add 3 more lines)
gpgcheck=1
enabled=1
baseurl=file:///mnt/disc/BaseOS
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
# yum clean all
# yum repolist enabled
# yum repolist enabled
Last Updated on Thursday, 08 July 2021 23:44