centos 7.6镜像_Centos7 配置本地yum源为iso镜像
作者:互联网
创建挂载路径
sudo mkdir /media/iso
挂载ISO镜像到目录
sudo mount -o loop CentOS-7-x86_64-Minimal-1810.iso /media/iso
下载地址: http://mirrors.sohu.com/centos/7.6.1810/isos/x86_64/CentOS-7-x86_64-Minimal-1810.iso
验证挂载
df -h
创建本地yum源配置文件
sudo touch /etc/yum.repos.d/local.repo
编辑local.repo文件内容
[local_server]
name=Thisis a local repo
baseurl=file:///media/iso
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
更新yum源
yum clean all
yum makecache
标签:1810,centos,源为,media,sudo,iso,yum,镜像,local 来源: https://www.cnblogs.com/xiaohaoge/p/16384054.html