ISO镜像做yum源

先上传一个镜像文件 centos-7-x86-1708.iso

挂载

mount -o loop /root/centos-7-x86-1708.iso /file

设置开机自动挂载

vi /etc/fastb

添加  /root/CentOS-7-x86_64-DVD-1708.iso  /file iso9660 loop,defaults 0 0

配置yum

cd /etc/yum.repos.d

mkdir /file

vim local.repo

[local]

name=local_repo

baseurl=file:///file

gpgcheck=0

enabled=1

posted on 2020-05-18 16:33  SZ_文彬  阅读(525)  评论(0编辑  收藏  举报