挂载centos7镜像做成本地源
1、将镜像文件拷贝至Linux文件目录,如/usr/local/src
2、mkdir /media/centos7
3、mount /usr/local/src/centos7.iso /media/centos7
4、rm -rf /etc/yum.repos.d/*
5、vim /etc/yum.repos.d/centos7-localsource.repo
输入内容:
[centos7-localsource]
name=centos7
baseurl=file:///media/centos7
enabled=1
gpgcheck=0
保存退出
6、yum makecache
7、yum clean all
8、yum list