|
yum源更新为国内的镜像地址
1)备份系统原文件
1
| [iyunv@moban ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
|
2)下载国内的镜像地址文件
1
2
3
4
5
6
7
8
9
10
11
| [iyunv@moban ~]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo -P /usr/local/src/
--2015-07-04 20:31:59-- http://mirrors.163.com/.help/CentOS6-Base-163.repo
Resolving mirrors.163.com... 123.58.173.185, 123.58.173.186
Connecting to mirrors.163.com|123.58.173.185|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2006 (2.0K) [application/octet-stream]
Saving to: “/usr/local/src/CentOS6-Base-163.repo”
100%[=========================================================================>] 2,006 --.-K/s in 0s
2015-07-04 20:32:04 (17.4 MB/s) - “/usr/local/src/CentOS6-Base-163.repo” saved [2006/2006]
|
3)拷贝文件到系统目录下
1
| [iyunv@moban src]# cp CentOS6-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo
|
4)清除缓存,刷新yum
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| [iyunv@moban src]# yum clean all
Loaded plugins: fastestmirror, security
Cleaning repos: base extras updates
Cleaning up Everything
Cleaning up list of fastest mirrors
[iyunv@moban src]# yum makecache
Loaded plugins: fastestmirror, security
Determining fastest mirrors
base | 3.7 kB 00:00
base/group_gz | 216 kB 00:00
base/filelists_db | 6.1 MB 00:06
base/primary_db | 4.6 MB 00:04
base/other_db | 2.8 MB 00:02
extras | 3.4 kB 00:00
extras/filelists_db | 32 kB 00:00
extras/prestodelta | 605 B 00:00
extras/primary_db | 31 kB 00:00
extras/other_db | 37 kB 00:00
updates | 3.4 kB 00:00
updates/filelists_db | 2.6 MB 00:02
updates/prestodelta | 398 kB 00:00
updates/primary_db | 3.9 MB 00:03
updates/other_db | 38 MB 00:38
Metadata Cache Created
|
|
|