本地YUM源的制作
一、光盘挂载
1、为DVD创建一个挂载目录
二、文件复制
1、创建一个yum源目录
三、修改yum配置文件
Yum配置文件的位置:
/etc/yum.repos.d/
1、备份原有yum配置文件
2、yum.repos.d目录只保留一个配置文件
3、修改yum配置文件:
#CentOS-Media.repo
#This repo can be used with mounted DVD media, verify the mount point for
#CentOS-7. You can use this repo and yum to install items directly off the
#DVD ISO that we release.
#To use this repo, put in your DVD and use it with the other repos too:
#yum –enablerepo=c7-media [command]
##or for ONLY the media repo, do this:
##yum –disablerepo=* –enablerepo=c7-media [command]
[c7-media]
name=CentOS-$releasever – Media
baseurl=file:///media/centos7/ –>这一行改成前边我们新建的CentOS目录
#file:///media/cdrom/ –>这一行加# 注释掉
#file:///media/cdrecorder/ –>这一行加# 注释掉
gpgcheck=1
enabled=1 –>这一行把0改成1来启用源
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
4、清除原有的yum信息并建立缓存文件
5、检查软件列表

文章知识点与官方知识档案匹配,可进一步学习相关知识CS入门技能树Linux入门在线安装软件24750 人正在系统学习中
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!