0. 前置条件-添加host

vi /etc/hosts
### 追加一行 10.251.102.1 mirrors.shanhe.com
10.251.102.1 mirrors.shanhe.com
## 保存后退出 :wq

1. 山河云CentOS7 yum配置

[base]
name=CentOS-$releasever - Base - mirrors.shanhe.com
failovermethod=priority
baseurl=http://10.251.102.1/centos/$releasever/os/$basearch/
gpgcheck=0
enabled=1 

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://10.251.102.1/epel/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=0

2. 山河云CentOS8 yum配置

[base]
name=CentOS-$releasever - Base - mirrors.shanhe.com
failovermethod=priority
baseurl=http://mirrors.shanhe.com/centos/$releasever/BaseOS/$basearch/os
gpgcheck=0
enabled=1

[extras]
name=CentOS-$releasever - Extras - mirrors.shanhe.com
failovermethod=priority
baseurl=http://mirrors.shanhe.com/centos/$releasever/extras/$basearch/os/
gpgcheck=0

[centosplus]
name=CentOS-$releasever - Plus - mirrors.shanhe.com
failovermethod=priority
baseurl=http://mirrors.shanhe.com/centos/$releasever/centosplus/$basearch/os/
gpgcheck=0
enabled=0

[PowerTools]
name=CentOS-$releasever - PowerTools - mirrors.shanhe.com
failovermethod=priority
baseurl=http://mirrors.shanhe.com/centos/$releasever/PowerTools/$basearch/os/
gpgcheck=0
enabled=0

[AppStream]
name=CentOS-$releasever - AppStream - mirrors.shanhe.com
failovermethod=priority
baseurl=http://mirrors.shanhe.com/centos/$releasever/AppStream/$basearch/os/
gpgcheck=0
作者:admin  创建时间:2023-03-21 16:04
最后编辑:admin  更新时间:2024-06-12 17:47