vlambda博客
学习文章列表

【DB宝38】CentOS 6的网络yum源配置(最新地址)


CentOS 6操作系统版本结束了生命周期(EOL),Linux社区已不再维护该操作系统版本。建议您升级操作系统至CentOS 7及以上,如果您的业务过渡期仍需要使用CentOS 6系统中的一些安装包,请根据下文切换CentOS 6的源。


解决办法:直接执行如下命令即可:

 1cat >> /etc/yum.repos.d/CentOS-aliyun-lhr.repo <<"EOF"
2[base]
3name=CentOS-6.10
4enabled=1
5failovermethod=priority
6baseurl=http://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/
7gpgcheck=1
8gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
9[updates]
10name=CentOS-6.10
11enabled=1
12failovermethod=priority
13baseurl=http://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/
14gpgcheck=1
15gpgkey=http://mirrors.aliyun.comm/centos-vault/RPM-GPG-KEY-CentOS-6
16[extras]
17name=CentOS-6.10
18enabled=1
19failovermethod=priority
20baseurl=http://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/
21gpgcheck=1
22gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
23[epel]
24name=Extra Packages for Enterprise Linux 6 - $basearch
25enabled=1
26failovermethod=priority
27baseurl=http://mirrors.aliyun.com/epel-archive/6/$basearch
28gpgcheck=0
29gpgkey=http://mirrors.aliyun.com/epel-archive/RPM-GPG-KEY-EPEL-6
30EOF
31
32
33
34cat >> /etc/yum.repos.d/CentOS-neusoft-lhr.repo <<"EOF"
35[base]
36name=CentOS-6-Base
37baseurl=http://mirrors.neusoft.edu.cn/centos/6/os/$basearch/
38gpgcheck=1
39gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
40[updates]
41name=CentOS-6-Updates
42baseurl=http://mirrors.neusoft.edu.cn/centos/6/updates/$basearch/
43gpgcheck=1
44gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
45[extras]
46name=CentOS-6-Extras
47baseurl=http://mirrors.neusoft.edu.cn/centos/6/extras/$basearch/
48gpgcheck=1
49gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
50[centosplus]
51name=CentOS-6-Plus
52baseurl=http://mirrors.neusoft.edu.cn/centos/6/centosplus/$basearch/
53gpgcheck=1
54enabled=0
55gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
56[contrib]
57name=CentOS-6-Contrib
58baseurl=http://mirrors.neusoft.edu.cn/centos/6/contrib/$basearch/
59gpgcheck=1
60enabled=0
61gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
62[epel]
63name=Extra Packages for Enterprise Linux 6 - $basearch
64enabled=1
65failovermethod=priority
66baseurl=http://mirrors.neusoft.edu.cn/epel/6/$basearch
67gpgcheck=0
68gpgkey=http://mirrors.neusoft.edu.cn/epel/RPM-GPG-KEY-EPEL-6
69EOF

本文结束。


【DB宝38】CentOS 6的网络yum源配置(最新地址)

• 若有侵权请联系小麦苗删除

【DB宝38】CentOS 6的网络yum源配置(最新地址)

★DB宝分享的IT资料:https://mp.weixin.qq.com/s/Iwsy-zkzwgs8nYkcMz29ag★DB宝笔试面试详解:https://mp.weixin.qq.com/s/Vm5PqNcDcITkOr9cQg6T7w

【DB宝38】CentOS 6的网络yum源配置(最新地址)

【DB宝38】CentOS 6的网络yum源配置(最新地址)