搭建本地yum源

 1.删除/etc/yum.repos.d/所有文件

  2.创建yum文件

cat /etc/yum.repos.d/centos.repo
[Centos7]
name=Centos7
baseurl=file:///mnt/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

3.挂载ios至/mnt 

4.执行yum clean all

posted @ 2019-12-13 13:18  caonw  阅读(300)  评论(0编辑  收藏  举报