这里是普通文章模块栏目内容页
为CentOS6.5添加源 (RHEL/CentOS/SL Linux)
#CentOS(RedHat) Maya2012x64 need Package:
#libXp-devel.x86_64

------------------------------------------------------
CentOS6.5 添加源:

参考:
1.RHEL/CentOS/SL Linux 6.x使用EPEL 6的yum软件源
http://blog.csdn.net/jiedushi/article/details/6448636

2.为centos添加第三方源
http://blog.chinaunix.net/uid-20754878-id-3092063.html

-------------------------------------------------------
如果既想获得 RHEL 的高质量、高性能、高可靠性,又需要方便易用(关键是免费)的软件包更新功能,那么 Fedora Project 推出的 EPEL(Extra Packages for Enterprise Linux)正好适合你。EPEL(http://fedoraproject.org/wiki/EPEL) 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。装上了 EPEL,就像在 Fedora 上一样,可以通过 yum install package-name,随意安装软件。

一、安装CentOS yum源优先级插件yum-priorities
yum install yum-plugin-priorities.noarch
################################################################  

二、设置CentOS默认yum源的优先级为最高
cd  /etc/yum.repos.d/   #进入yum源目录
vi CentOS-Base.repo    #在[base]、[updates]、[extras]组下面添加priority=1,在[centosplus]、[contrib]组下面添加priority=2
(
备注:priority的优先级为1到99,设置为1即优先级最高,1-10为系统保留,第三方yum源的优先级从11-99
)
################################################################  

三、安装epel yum源
(
Reference:
https://dl.fedoraproject.org/pub/epel/6/x86_64/
)
    rpm -ivh  https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
    vi /etc/yum.repos.d/epel.repo   #修改epel yum源优先级,priority=11
################################################################  

四、安装rpmforge yum源
(
Reference:
http://wiki.centos.org/AdditionalResources/Repositories/RPMForge#head-f0c3ecee3dbb407e4eed79a56ec0ae92d1398e01
http://repoforge.org/use/
Download rpm package:
http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/
OR:
rpm -ivh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
)
   wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
   wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
   rpm --import RPM-GPG-KEY.dag.txt
   rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm
   vi  /etc/yum.repos.d/rpmforge.repo  #修改rpmforge yum源优先级,priority=12
################################################################  

五、安装rpmfusion yum源
(
Reference:
http://rpmfusion.org/Configuration
)
yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpmhttp://download1.rpmfusion.org/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm
vim rpmfusion-free-updates.repo #修改rpmfusion yum源优先级,priority=13
################################################################  

六、更新yum软件包
       yum check-update
------------------------------------------------------

PS:
add 163 source
(Reference: http://mirrors.163.com/.help/centos.html)

cd /etc/yum.repos.d

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

vim CentOS6-Base-163.repo #修改163 yum源优先级,priority=10

add mock-rpmfusion-free-19.1-1.el6.noarch.rpm
(Reference: http://download1.rpmfusion.org/free/el/updates/6/x86_64/)
yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/el/updates/6/x86_64/mock-rpmfusion-free-19.1-1.el6.noarch.rpm