vi /etc/yum.repos.d/CentOS-Base.repo
在文件中添加priority=N(N>10)
如我的CentOS-Base.repo配置:
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
忆流年 于 2012-12-28 16:01:16发表:
这个系统要怎么把英文的改成中文的?
xiaobin198734 于 2012-12-05 19:46:24发表:
好东西,谢谢楼主分享!!
loveywe 于 2012-12-05 19:21:39发表:
冒似用不上嘛,等需要的时候再来! :987w(1
飞吧小鸭子 于 2012-11-24 21:53:27发表:
!!!==!!!才知道下载还扣10圆那
CentOS 6.3 使用第三方软件库(EPEL与RPMForge.RPMFusion第三方库)
在这里就不介绍库了,只把怎么配置贴出来。(参考为32位,如是64位请自行更改参数)
一.安装yum-priorities插件。
yum install yum-priorities
vi /etc/yum.repos.d/CentOS-Base.repo
在文件中添加priority=N(N>10)
如我的CentOS-Base.repo配置:
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[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
priority=1
#released updates
[updates]
name=CentOS-$releasever - Updates - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
priority=1
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
priority=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
priority=2
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
priority=2
二.下载与安装相应EPEL的rpm文件包
# wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
# rpm --import RPM-GPG-KEY-EPEL-6
# rm -f RPM-GPG-KEY-EPEL-6
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
rpm -ivh epel-release-6-7.noarch.rpm
导入DAG到PGP KEY
rpm -import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
设置/etc/yum.repos.d/epel.repo文件中源的级别,就是添加priority=11。
可参考http://fedoraproject.org/wiki/EPEL/FAQ#howtouse
三.下载与安装相应RPMFORGE的RPM文件包
wget http://apt.sw.be/redhat/el6/en/x86_64/dag/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
设置/etc/yum.repos.d/rpmforge.repo文件中源的级别,就是添加priority=12。
四.下载与安装行应rpmfusion的rpm文件包
su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm'
具体可参考http://rpmfusion.org/Configuration
五.测试
yum check-update
yum install mplayer.
本文参考http://wiki.centos.org/zh/AdditionalResources/Repositories
Seyonb 于 2012-11-24 09:16:08发表:
支持楼主
clizhs 于 2012-11-23 15:26:28发表:
干嘛用的 不懂
Codebrother 于 2012-11-23 14:41:04发表:
支持你