• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
james1207

博客园    首页    新随笔    联系   管理    订阅  订阅

centos 6.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

更新源地址如下:

[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 


 

posted @ 2013-08-25 21:07  Class Xman  阅读(330)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3