centos 6.4 更新源地址

执行如下命令:

1
2
3
4
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.old

vim /etc/yum.repos.d/CentOS-Base.repo (粘贴下面的更新源地址,[小提示]vim粘贴方法:首先选中更新源地址内容,然后在vim中按下字母i进入编辑模式,然后点击鼠标中间,即可粘贴刚才选中的内容)
yum update

 
更新源地址如下:

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
[base]
name=CentOS-6 - Base
repo=os
baseurl=http://mirrors.163.com/centos/6.4/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates
[update]
name=CentOS-6 - Updates
baseurl=http://mirrors.163.com/centos/6.4/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#packages used/produced in the build but not released
#[addons]
#name=CentOS-6 - Addons
#baseurl=http://mirrors.163.com/centos/6.4/addons/$basearch/
#gpgcheck=1
#gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-6 - Extras
baseurl=http://mirrors.163.com/centos/6.4/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus
baseurl=http://mirrors.163.com/centos/6.4/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib
baseurl=http://mirrors.163.com/centos/6.4/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

 

坚持原创技术分享,您的支持将鼓励我继续创作!