本地yum源配置

Posted 淡水留恋

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了本地yum源配置相关的知识,希望对你有一定的参考价值。

1、修改  vi /etc/yum.repos.d/CentOS-Media.repo

baseurl=file:///mnt/cdrom  地址
gpgcheck=0  检查版本号  0为不检查
enabled=1  是否生效  1为生效

2、mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom   挂在光盘

3、使CentOS-Media.repo生效

   rename .repo .repo.bak *    将所有扩展名为。.repo修改为.repo.bak

   mv CentOS-Media.repo.bak CentOS-Media.repo  

4、yum clean all  清理缓存

 

以上是关于本地yum源配置的主要内容,如果未能解决你的问题,请参考以下文章