创建挂载路径
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
原创文章,作者:254126420,如若转载,请注明出处:https://blog.ytso.com/268242.html