本地yum 源 iso文件

1.挂载

# mkdir /mnt/cdrom
# mount /mnt/CentOS-7.0-1406-x86_64-DVD.iso /mnt/cdrom/

2.配置

# touch CentOS-ISO.repo
# cat CentOS-ISO.repo
[base]
name=CentOS-$releasever – Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=0
gpgkey=file:///mnt/cdrom/rpm-gpg/RPM-GPG-KEY-CentOS-7

 参考:https://blog.51cto.com/11495268/2314967

相关推荐