当前位置: 首页 >硬件

更换aarch64的centos的yum源终于成功了 之前 试了aliyun 163 都不行

硬件 2020-11-12 阅读量: 1,564 TAG:

打开/etc/yum.repos.d/

修改

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base - mirrors.huaweicloud.com
failovermethod=priority
baseurl=http://mirrors.huaweicloud.com/centos-altarch/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.huaweicloud.com/centos/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates - mirrors.huaweicloud.com
failovermethod=priority
baseurl=http://mirrors.huaweicloud.com/centos-altarch/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.huaweicloud.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.huaweicloud.com
failovermethod=priority
baseurl=http://mirrors.huaweicloud.com/centos-altarch/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.huaweicloud.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.huaweicloud.com
failovermethod=priority
baseurl=http://mirrors.huaweicloud.com/centos-altarch/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.huaweicloud.com/centos/RPM-GPG-KEY-CentOS-7

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.huaweicloud.com
failovermethod=priority
baseurl=http://mirrors.huaweicloud.com/centos-altarch/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.huaweicloud.com/centos/RPM-GPG-KEY-CentOS-7

清理并更新

1
2
3
yum clean all
yum makecache
yum update

指令修改

1
sed -i -E -e 's;^mirrorlist=;#mirrorlist=;' -e 's;^ *# *baseurl=http://mirror.centos.org/altarch/;baseurl=http://mirrors.huaweicloud.com/centos-altarch/;' /etc/yum.repos.d/*.repo
 

(微信/QQ号:909912499),欢迎分享本文,转载请保留出处!部分内容来自网络,如有侵权请联系删除处理!

相关信息

本站提供代码修改,dedecms,WordPress仿站二次开发 / PHP网站建设以及SEO优化等网络营销推广等服务。

如有需要请加QQ: 909912499