CentOS 7 : yum local.repos by cdrom Hint

 

mkdir /mnt/cdrom

 

mount /dev/cdrom /mnt/cdrom

 

mkdir /etc/yum.repos.d/org

mv /etc/yum.repos.d/CentOS-* /etc/yum.repos.d/org/

 

vi /etc/yum.repos.d/local.repo

[local-repo]

name=Local Repository

baseurl=file:///mnt/cdrom/

enabled=1

gpgcheck=0

 

=========================

append IOS file mount for update local repos

 

mkdir -p /mnt/CentOS7-1908

mount -o loop /R1D1TB1/install/CentOS-7-x86_64-DVD-1908.iso /mnt/CentOS7-1908

vi /etc/yum.repos.d/local.repo 

[local-repo]

name=Local Repository

baseurl=file:///mnt/cdrom/

enabled=1

gpgcheck=0

 

[local-CentOS7-1908]

name=Local Repository CentOS7-1908

baseurl=file:///mnt/CentOS7-1908

enabled=1

gpgcheck=0