Centos6.5更换163源 epel源
转自:http://www.jb51.cc/article/p-ujssnuzj-bev.html
想必大家都遇到过,安装新的centos系统,使用yum去安装软件的时候,要么找不到,要么慢的让人发疯。
网上其实办法很多,直接更换163源就ok,但是基本所有的文章都是直接wget下163的源,但是不知道为什么,wget下来的repo文件各种不好使,还得自己修改一下。这里,我把自己修改好的源复制到这里,大家换源的时候直接复制粘贴就ok了。
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
|
[base]
name=CentOS-$releasever-Base-163.com
baseurl=http:
//mirrors
.163.com
/centos/
$releasever
/os/
$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http:
//mirror
.centos.org
/centos/RPM-GPG-KEY-CentOS-6
#releasedupdates
[updates]
name=CentOS-$releasever-Updates-163.com
/updates/
$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
/centos/RPM-GPG-KEY-CentOS-6
#additionalpackagesthatmaybeuseful
[extras]
name=CentOS-$releasever-Extras-163.com
/extras/
$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
/centos/RPM-GPG-KEY-CentOS-6
#additionalpackagesthatextendfunctionalityofexistingpackages
[centosplus]
name=CentOS-$releasever-Plus-163.com
/centosplus/
$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
/centos/RPM-GPG-KEY-CentOS-6
#contrib-packagesbyCentosUsers
[contrib]
name=CentOS-$releasever-Contrib-163.com
/contrib/
$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=
|
不知道大家喜欢怎么使用,我一般直接把系统自带的CentOS-Base.repo文件清空,然后将以上内容复制粘贴进去就OK。
OK,163源就这样。
当然,还有另外一种办法:
7 | @H_815_301@
1 | @H_815_301@
最后,强调一下我的操作系统是centos6.5。