CentOS 挂载 ISO 作为 reop 源

参考这里 https://linux.cn/article-1017-…

先光盘挂载上去

mkdir /mnt/cdrom
mount -o loop /dev/cdrom /mnt/cdrom/

然后备份 repo 文件

mkdir /etc/yum.repos.d/bak
mv *.repo /etc/yum.repos.d/bak 

然后新建自己的文件

[base]
name=RedHat
baseurl=file:///mnt/cdrom    
enabled=1
gpgckeck=0
gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-CentOS-6

可以了

Leave a Reply

Your email address will not be published. Required fields are marked *