CentOS6.4配置163的yum源

摘自:http://www.hiceon.com/topic/centos-6-config-163-yum/

1.下载repo文件

 
 
  1. wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

2.备份并替换系统的repo文件

 
 
  1. [root@localhost ~]# cd /etc/yum.repos.d/
  2. [root@localhost ~]# mv CentOS-Base.repo CentOS-Base.repo.bak
  3. [root@localhost ~]# mv CentOS6-Base-163.repo CentOS-Base.repo

3.执行yum源更新

 
 
  1. [root@localhost ~]# yum clean all
  2. [root@localhost ~]# yum makecache
  3. [root@localhost ~]# yum update
另外和种办法好用:
摘自:http://www.ctyun.cn/bbs/forum.php?mod=viewthread&tid=1023&page=1
#!/bin/sh # install epel su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm' rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 # install rpmfusion su -c 'yum localinstall -y --nogpgcheck http://download1.rpmfusion.org/free/el/updates/6/x86_64/rpmfusion-free-release-6-1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/6/x86_64/rpmfusion-nonfree-release-6-1.noarch.rpm' # update base repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup wget http://mirrors.163.com/.help/CentOS6-Base-163.repo mv CentOS6-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo yum install -y yum-priorities yum makecache # update yum update -y
rpm源:
摘自:http://www.linuxidc.com/Linux/2012-06/62964.htm

rpmforge源可以在 http://pkgs.repoforge.org/rpmforge-release/中下载安装,名为rpmforge-release-*.i686.rpm 或 rpmforge-release-*.x86_64.rpm,找最新的版本

epel源可以在http://mirrors.ustc.edu.cn/Fedora/epel/6/ 中找到,32系统在i386文件夹中,64位的在x86_64文件夹中,名为epel-release-6-*.noarch.rpm,找最新的版本

这里以32位系统为例子,

  1. #如果提示The requested URL returned error: 404,请自行换成最新的版本  
  2. rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm  
  3. rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm  
摘自:http://panguohui.blog.51cto.com/1866059/827987

CentOS 6透过EPEL (Extra Packages for Enterprise Linux) 套件库来解决缺少的相关套件;

 首先,安装对应的Release档案:rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
接着,更新套件库:yum update
更新后,可以透过 yum repolist 看到套件库清单中已经有一个新的套件库,名称为 epel
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值