把光驱挂载到虚拟机
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cd /etc/yum.repos.d/
ls
为了以后可以在互联网上安装备份把以前的文件备份
mkdir yumbak/
ls yumbak/
mv C*.* yumbak/
ls
yumbak
vi Centos-iso.repo
[base]
name=iso
baseurl=file:///mnt/cdrom
gpgcheck=0
~
yum clean all