CentOS6.4配置163的yum源

来源:互联网 发布:网络大电影用户分析 编辑:程序博客网 时间:2024/05/17 21:53

摘自: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 epelsu -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 rpmfusionsu -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 repomv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupwget http://mirrors.163.com/.help/CentOS6-Base-163.repomv CentOS6-Base-163.repo /etc/yum.repos.d/CentOS-Base.repoyum install -y yum-prioritiesyum makecache# updateyum 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
原创粉丝点击