将yum的目标服务器更改为中国大陆服务器镜像

修改/etc/yum.repos.d/CentOS-Base.repo,将镜象站点地址改为在中国的镜象站点地址。不然我们通过yum安装软件速度会比较慢。
以下的URL地址我都验证过了在当前完全可以下载,而且速度挺快.
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
vi /etc/yum.repos.d/CentOS-Base.repo
 
=============================================================
        
  1. # CentOS-Base.repo
  2.     
  3. #
  4.     
  5. # This file uses a new mirrorlist system developed by Lance Davis for CentOS.
  6.     
  7. # The mirror system uses the connecting IP address of the client and the
  8.     
  9. # update status of each mirror to pick mirrors that are updated to and
  10.     
  11. # geographically close to the client. You should use this for CentOS updates
  12.     
  13. # unless you are manually picking other mirrors.
  14.     
  15. #
  16.     
  17. # If the mirrorlist= does not work for you, as a fall back you can try the
  18.     
  19. # remarked out baseurl= line instead.
  20.     
  21. #
  22.     
  23. #
  24.     
  25.  
  26.     
  27. [base]
  28.     
  29. name=CentOS-$releasever - Base
  30.     
  31. baseurl=http://mirror.be10.com/centos/$releasever/os/$basearch/
  32.     
  33. http://ftp.iasi.roedu.net/mirrors/centos.org/$releasever/os/$basearch/
  34.     
  35. http://ftp.ncnu.edu.tw/Linux/CentOS/$releasever/os/$basearch/
  36.     
  37. http://ftp.hostrino.com/pub/centos/
  38.     
  39. gpgcheck=1
  40.     
  41. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
  42.     
  43. #released updates
  44.     
  45. [update]
  46.     
  47. name=CentOS-$releasever - Updates
  48.     
  49. baseurl=http://mirror.be10.com/centos/$releasever/os/$basearch/
  50.     
  51. http://ftp.iasi.roedu.net/mirrors/centos.org/$releasever/os/$basearch/
  52.     
  53. http://ftp.ncnu.edu.tw/Linux/CentOS/$releasever/os/$basearch/
  54.     
  55. http://ftp.hostrino.com/pub/centos/
  56.     
  57. gpgcheck=1
  58.     
  59. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
  60.     
  61. #packages used/produced in the build but not released
  62.     
  63. [addons]
  64.     
  65. name=CentOS-$releasever - Addons
  66.     
  67. baseurl=http://mirror.be10.com/centos/$releasever/os/$basearch/
  68.     
  69. http://ftp.iasi.roedu.net/mirrors/centos.org/$releasever/os/$basearch/
  70.     
  71. http://ftp.ncnu.edu.tw/Linux/CentOS/$releasever/os/$basearch/
  72.     
  73. http://ftp.hostrino.com/pub/centos/
  74.     
  75. gpgcheck=1
  76.     
  77. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
  78.     
  79. #additional packages that may be useful
  80.     
  81. [extras]
  82.     
  83. name=CentOS-$releasever - Extras
  84.     
  85. baseurl=http://mirror.be10.com/centos/$releasever/os/$basearch/
  86.     
  87. http://ftp.iasi.roedu.net/mirrors/centos.org/$releasever/os/$basearch/
  88.     
  89. http://ftp.ncnu.edu.tw/Linux/CentOS/$releasever/os/$basearch/
  90.     
  91. http://ftp.hostrino.com/pub/centos/
  92.     
  93. gpgcheck=1
  94.     
  95. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
  96.     
  97. #additional packages that extend functionality of existing packages
  98.     
  99. [centosplus]
  100.     
  101. name=CentOS-$releasever - Plus
  102.     
  103. baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
  104.     
  105. gpgcheck=1
  106.     
  107. enabled=0
  108.     
  109. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
  110.     
  111. #contrib - packages by Centos Users
  112.     
  113. [contrib]
  114.     
  115. name=CentOS-$releasever - Contrib
  116.     
  117. baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
  118.     
  119. gpgcheck=1
  120.     
  121. enabled=0
  122.     
  123. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

 

=======================================================================

或者直接下载SOHU 163 开源镜像服务器的配置文件到当前目录:

或者直接下载163 SOHU 镜像服务区
====================================
wget http://mirrors.163.com/.help/CentOS-Base-163.repo
wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
yum makecache
yum update

 

Linux/Unix | 评论(1) | 引用(0) | 阅读(9711)
kloxo
2011/05/05 09:38
装kloxo时出现
每次安装到这个地方就会卡住:
This will take a long time... Please wait...
Executing UpdateCleanup. This can take some time. Please be patient.
Fetch current InstallApp version.................. OK version is 5.0.5001
Checking for old installappdata.zip............... OK
Downloading InstallApp data....................... OK
Remove old InstallApp data........................ OK
Unpack new InstallApp data........................ OK
Remove downloaded InstallApp data zip file........ OK

求解决。
yum源我己改成163的了
刘新修 回复于 2011/05/06 09:22
之前没有遇见过此类问题,或换SOHU源测试一下。
第一页 1 最后页