使用本地yum源

2022-10-26 11:48:20 浏览数 (1)

搭建本地yum源

上传iso镜像到linux并挂载

# mount /data/isos/CentOS-7-x86_64-Everything-1511.iso /yum

备份原有源

# mkdir bak

# mv *.repo bak/

创建新源

# vim local.repo

[iso]

name=CentOS-7-x86_64-Everything-iso

baseurl=file:///yum

gpgcheck=0

enabled=1

清除旧源

# yum clean all

# yum makecheck

更新

# yum update

# yum upgrade

0 人点赞