Centos-7aarch64架构替换yum源为阿里云aliyun源epel源

一、备份原yum源

[root@dxh ~]# cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak


二、通过wget下载aliyun源和epel源

[root@dxh ~]# wget http://mirrors.aliyun.com/repo/Centos-altarch-7.repo -O /etc/yum.repos.d/CentOS-Base.repo
--2024-07-30 19:50:24--  http://mirrors.aliyun.com/repo/Centos-altarch-7.repo
正在解析主机 mirrors.aliyun.com (mirrors.aliyun.com)... 27.128.222.147, 27.128.222.145, 27.128.222.141
正在连接 mirrors.aliyun.com (mirrors.aliyun.com)|27.128.222.147|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1428 (1.4K) [application/octet-stream]
正在保存至: “/etc/yum.repos.d/CentOS-Base.repo”

100%[========================================================>] 1,428       --.-K/s 用时 0.004s  

2024-07-30 19:50:25 (321 KB/s) - 已保存 “/etc/yum.repos.d/CentOS-Base.repo” [1428/1428])

[root@dxh ~]# wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
--2024-07-30 19:50:37--  https://mirrors.aliyun.com/repo/epel-7.repo
正在解析主机 mirrors.aliyun.com (mirrors.aliyun.com)... 27.128.222.142, 27.128.222.148, 27.128.222.147
正在连接 mirrors.aliyun.com (mirrors.aliyun.com)|27.128.222.142|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:664 [application/octet-stream]
正在保存至: “/etc/yum.repos.d/epel.repo”

100%[========================================================>] 664         --.-K/s 用时 0.002s  

2024-07-30 19:50:37 (401 KB/s) - 已保存 “/etc/yum.repos.d/epel.repo” [664/664])

三、清除并重新构建缓存

[root@dxh ~]# yum clean all
已加载插件:fastestmirror, langpacks
正在清理软件源: base epel extras updates
Cleaning up list of fastest mirrors
[root@dxh ~]# yum makecache
已加载插件:fastestmirror, langpacks
Determining fastest mirrors
base                                                                       | 3.6 kB  00:00:00     
epel                                                                       | 5.4 kB  00:00:00     
extras                                                                     | 2.9 kB  00:00:00     
updates                                                                    | 2.9 kB  00:00:00     
(1/17): base/7/aarch64/group_gz                                            | 153 kB  00:00:00     
(2/17): base/7/aarch64/primary_db                                          | 4.9 MB  00:00:11     
(3/17): epel/aarch64/group_gz                                              |  88 kB  00:00:00     
(4/17): epel/aarch64/updateinfo                                            | 1.0 MB  00:00:02     
(5/17): epel/aarch64/prestodelta                                           | 3.5 kB  00:00:00     
(6/17): base/7/aarch64/filelists_db                                        | 6.2 MB  00:00:16     
(7/17): base/7/aarch64/other_db                                            | 2.1 MB  00:00:06     
(8/17): epel/aarch64/primary_db                                            | 6.6 MB  00:00:16     
(9/17): epel/aarch64/other_db                                              | 3.2 MB  00:00:07     
(10/17): extras/7/aarch64/primary_db                                       | 255 kB  00:00:00     
(11/17): extras/7/aarch64/filelists_db                                     | 358 kB  00:00:01     
(12/17): extras/7/aarch64/other_db                                         | 154 kB  00:00:00     
(13/17): epel/aarch64/updateinfo_zck                                       | 1.5 MB  00:00:03     
(14/17): epel/aarch64/filelists_db                                         |  11 MB  00:00:31     
(15/17): updates/7/aarch64/filelists_db                                    | 4.3 MB  00:00:10     
(16/17): updates/7/aarch64/primary_db                                      | 4.0 MB  00:00:10     
(17/17): updates/7/aarch64/other_db                                        | 1.1 MB  00:00:03     
元数据缓存已建立

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不止会JS

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值