首页 > Linux操作系统 > Linux操作系统 > CentOS6.6配置yum
1、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、更换centos6yum源( centos6官方源已下线,建议切换centos-vault源 )
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
3、yum clean all && yum makecache
yum clean all && yum makecache
配置过程如下
[root@master yum.repos.d]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
mv:是否覆盖"/etc/yum.repos.d/CentOS-Base.repo.backup"?
[root@master yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
--2022-10-10 15:31:43-- https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
正在解析主机 mirrors.aliyun.com... 221.204.23.239, 221.204.23.240, 221.204.23.238, ...
正在连接 mirrors.aliyun.com|221.204.23.239|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:2533 (2.5K) [application/octet-stream]
正在保存至: “/etc/yum.repos.d/CentOS-Base.repo”
100%[==========================================================================>] 2,533 --.-K/s in 0.01s
2022-10-10 15:31:48 (201 KB/s) - 已保存 “/etc/yum.repos.d/CentOS-Base.repo” [2533/2533])
[root@master yum.repos.d]# yum clean all
已加载插件:fastestmirror, refresh-packagekit, security
Cleaning repos: base epel extras updates
清理一切
Cleaning up list of fastest mirrors
[root@master yum.repos.d]# yum makecache
已加载插件:fastestmirror, refresh-packagekit, security
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.7 kB 00:00
base/group_gz | 242 kB 00:02
base/filelists_db | 6.4 MB 01:00
base/primary_db | 4.7 MB 00:41
base/other_db | 2.8 MB 00:24
epel | 4.7 kB 00:00
epel/group_gz | 97 kB 00:01
epel/filelists_db | 12 MB 01:49
原文链接:https://blog.csdn.net/weixin_44943389/article/details/127247170
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31440090/viewspace-2932363/ ,如需转载,请注明出处,否则将追究法律责任。