默认centos自带的源少了很多好软件,所以需要添加第三方源
一、安装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
################################################################   
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1

[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1

[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1

[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=2

[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=2
###############################################################   
备注:priority的优先级为1到99,设置为1即优先级最高,1-10为系统保留,第三方yum源的优先级从11-99

三、安装epel yum源
    rpm -ivh  http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
    rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
    vi /etc/yum.repos.d/epel.repo   #修改epel yum源优先级,priority=11
   
###############################################################
    [epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
priority=11
#################################################################

四、安装rpmforge yum源
   wget http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.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
 
#################################################################
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
priority=12
#################################################################

五、安装rpmfusion yum源
   rpm -ivh http://download1.rpmfusion.org/free/el/updates/testing/6/i386/rpmfusion-free-release-6-0.1.noarch.rpm
   vi  /etc/yum.repos.d/rpmfusion-free-updates-testing.repo   #修改rpmfusion yum源优先级,priority=13
 
#################################################################
[rpmfusion-free-updates-testing]
name=RPM Fusion for EL 6 - Free - Test Updates
#baseurl=http://download1.rpmfusion.org/free/el/updates/testing/6/$basearch/
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-el-updates-testing-6&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-el-6
priority=13
系统运维  www.osyunwei.com  温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接
#################################################################
六、安装atomic yum源
    wget http://www.atomicorp.com/installers/atomic  #下载
    sh ./atomic   #安装
    vi  /etc/yum.repos.d/atomic.repo  #修改atomic yum源优先级,priority=14
##############################################################
[atomic]
name = CentOS / Red Hat Enterprise Linux $releasever - atomicrocketturtle.com
mirrorlist = http://www.atomicorp.com/mirrorlist/atomic/centos-6-$basearch
#mirrorlist = http://www.atomicorp.com/channels/atomic/centos/6/mirrors-atomic
enabled = 1
priority = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt
gpgcheck = 1
priority=14
##############################################################
七、更新yum软件包
       yum check-update

为centos添加第三方源的更多相关文章

  1. CentOS7添加第三方源

    CentOS由于很追求稳定性,所以官方源中自带的软件不多,因而需要一些第三方源,比如EPEL.ATrpms.ELRepo.Nux Dextop.RepoForge等. EPEL EPEL即Extra ...

  2. centos系统安装第三方源EPEL

    epel没安装呗 相当于扩展型软件仓库,EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件包) 是Fedora小组维护的一个软件仓库项目,为 ...

  3. centos7 添加第三方源

    第三方源下载地址: http://repoforge.org/use/ 选择合适自己包 我选择的是EL7的 wget 下载这个包 接着使用rpm -ivh 包名 确认是否添加成功 ls /etc/yu ...

  4. 给centOs添加epel源

    epel简介: https://fedoraproject.org/wiki/EPEL/zh-cn 1. rpm -Uvh http://dl.fedoraproject.org/pub/epel/5 ...

  5. centos添加epel源

    1. rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm    粗体部分需要根据自己的 ...

  6. centos 添加rpmfusion源,yum 安装 ffmpeg

    rpmfusion提供了,在Fedora和 centos 源之外的其他yum 源 例如ffmpeg 在 centos 基础源和epel-release 里面都没有, 但是可以在rpmfusion中找到 ...

  7. CentOS添加163源

    1.备份/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-B ...

  8. eclipse添加第三方源码

  9. centos下添加epel源

    RHEL以及他的衍生发行版如CentOS.Scientific Linux为了稳定,官方的rpm repository提供的rpm包往往是很滞后的,当然了,这样做这是无可厚非的,毕竟这是服务器版本,安 ...

随机推荐

  1. nexus REST API /artifact/maven/[resolve|redirect] returns unexpected for v=LATEST

    Novice nexus oss (2.0.0) user here – getting unexpected results when requesting v=LATEST artifact fr ...

  2. nginx自定义模块记录上游服务器特定响应头

    功能,服务器通过扩展自定义命令,记录上游的服务器返回的特定响应头内容,记录到本地文件中 代码如下: /* * Copyright (C) Ciaos */ #include <ngx_confi ...

  3. Swift与Objective-C API的交互

    互用性是让 Swift 和 Objective-C 相接合的一种特性,使你能够在一种语言编写的文件中使用另一种语言.当你准备开始把 Swift 融入到你的开发流程中时,你应该懂得如何利用互用性来重新定 ...

  4. jQuery 1.9+ ajaxStart事件无效,无法被触发的原因。

    AJAX 事件需要绑定到document 在jQuery 1.9中, 全局的AJAX事件(ajaxStart, ajaxStop, ajaxSend, ajaxComplete, ajaxError, ...

  5. gridview的高级使用

      后台数据 using System; using System.Collections.Generic; using System.Linq; using System.Web; using Sy ...

  6. WPF自学笔记

    WPF使用哪几种元素作为顶级元素: 1. Window元素 2. Page元素(与Window元素类似,用于可导航的应用程序) 3. Application元素(定义应用程序资源和启动设置) PS:在 ...

  7. Spring源码地址和相关介绍的网址

    Spring源码地址下载: https://github.com/spring-projects/spring-framework/tags >多图详解Spring框架的设计理念与设计模式:ht ...

  8. 【转载】如何用Maven创建web项目(具体步骤)

    使用eclipse插件创建一个web project 首先创建一个Maven的Project如下图 我们勾选上Create a simple project (不使用骨架) 这里的Packing 选择 ...

  9. Eclipse使用笔记

    eclipse内容辅助键 alt+ /用法: Alt+/ 提示作用 帮助补齐一些东西,还可以帮助你起名字, main+alt+/,syso+alt+/ alt+shift+s给出一些快捷操作,比如fo ...

  10. judge loop in undirected graph

    一 深度优先遍历,参考前面DFS(white and gray and black) 二 根据定点以及边数目进行判断 如果m(edge)大于n(vertex),那么肯定存在环 算法如下: 1 删除所有 ...