CentOS6.x的163yum配置

Posted ruigu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS6.x的163yum配置相关的知识,希望对你有一定的参考价值。

[[email protected] ~]# cd /etc/yum.repos.d/       #进入yum镜像文件夹
[[email protected] yum.repos.d]# ll
总用量 24
-rw-r--r--. 1 root root 1991 3月  28 2017 CentOS-Base.repo
-rw-r--r--. 1 root root  647 3月  28 2017 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  289 3月  28 2017 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 3月  28 2017 CentOS-Media.repo
-rw-r--r--. 1 root root 7989 3月  28 2017 CentOS-Vault.repo
[[email protected] yum.repos.d]# wget wget http://mirrors.163.com/.help/CentOS6-Base-163.repo    # 下载163的yum镜像文件
--2017-11-19 11:24:11--  http://wget/
正在解析主机 wget... 失败:未知的名称或服务。
wget: 无法解析主机地址 “wget”
--2017-11-19 11:24:11--  http://mirrors.163.com/.help/CentOS6-Base-163.repo
正在解析主机 mirrors.163.com... 59.111.0.251
正在连接 mirrors.163.com|59.111.0.251|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:2006 (2.0K) [application/octet-stream]
正在保存至: “CentOS6-Base-163.repo”

100%[========================================================>] 2,006       --.-K/s   in 0s      

2017-11-19 11:24:12 (8.15 MB/s) - 已保存 “CentOS6-Base-163.repo” [2006/2006])

下载完毕 --2017-11-19 11:24:12--
下载了:1 个文件,0s (8.15 MB/s) 中的 2.0K
[[email protected] yum.repos.d]# ll
总用量 28
-rw-r--r--. 1 root root 2006 12月  1 2016 CentOS6-Base-163.repo
-rw-r--r--. 1 root root 1991 3月  28 2017 CentOS-Base.repo
-rw-r--r--. 1 root root  647 3月  28 2017 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  289 3月  28 2017 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 3月  28 2017 CentOS-Media.repo
-rw-r--r--. 1 root root 7989 3月  28 2017 CentOS-Vault.repo

#做好备份,且将新下载的yum文件改名为:CentOS-Base.repo
[[email protected] yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
[r[email protected] yum.repos.d]# mv CentOS6-Base-163.repo CentOS-Base.repo
[[email protected] yum.repos.d]# ll
总用量 28
-rw-r--r--. 1 root root 2006 12月  1 2016 CentOS-Base.repo
-rw-r--r--. 1 root root 1991 3月  28 2017 CentOS-Base.repo.bak
-rw-r--r--. 1 root root  647 3月  28 2017 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  289 3月  28 2017 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 3月  28 2017 CentOS-Media.repo
-rw-r--r--. 1 root root 7989 3月  28 2017 CentOS-Vault.repo
[[email protected] yum.repos.d]# yum clean all
已加载插件:fastestmirror, refresh-packagekit, security
Cleaning repos: base extras updates
清理一切
Cleaning up list of fastest mirrors
[[email protected] yum.repos.d]# yum makecache
已加载插件:fastestmirror, refresh-packagekit, security
Determining fastest mirrors
base                                                                       | 3.7 kB     00:00     
base/group_gz                                                              | 226 kB     00:00     
base/filelists_db                                                                                                                                                | 6.4 MB     00:13     
base/primary_db                                                                                                                                                  | 4.7 MB     00:10     
base/other_db                                                                                                                                                    | 2.8 MB     00:05     
extras                                                                                                                                                           | 3.4 kB     00:00     
 此处忽略
updates/other_db                                                                                                                                                 |  83 MB     03:00     
元数据缓存已建立
[[email protected] yum.repos.d]# yum update

以上是关于CentOS6.x的163yum配置的主要内容,如果未能解决你的问题,请参考以下文章

linux系统更换网络YUM源

CentOS 5/6.X 使用 EPEL YUM源

CentOS6.x rsync+httpd搭建配置本地YUM源库

centos7 怎么配置yum 163的源

centos7 怎么配置yum 163的源

centos7 怎么配置yum 163的源