0%

离线部署yum源

下载相关镜像文件

  • Centos7.x.iso

挂载到每台机器上

1
2
3
mkdir -p /mnt/centos7 /mnt/centos7-epel
mount -t iso9660 xxxx.iso /mnt/centos7
mount -t iso9660 xxx.iso /mnt/centos7-epel

配置离线 repo

  • /etc/yum.repos.d/offline-centos7.repo

    1
    2
    3
    4
    5
    6
    [offline-centos7]
    name=CentOS-$releasever - blueking
    baseurl=file:///mnt/centos7
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  • /etc/yum.repos.d/offline-centos7-epel.repo

    1
    2
    3
    4
    5
    6
    7
    [offline-centos7-epel]
    name=CentOS-$releasever - blueking
    baseurl=file:///mnt/centos7-epel
    enabled=1
    exclude=epel-release
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7