`
随便小屋
  • 浏览: 102764 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

CentOS源安装

阅读更多

一、安装CentOS yum源优先级插件yum-priorities
yum install yum-priorities #输入y安装
二、设置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
#################################################################
系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接
五、安装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 7.6安装流程.docx

    centos 7.6安装流程下载详细安装过程,在网上看到特别好的教程,很好地解决了小白的问题,为此特意记录下来了。附件如下:centos 7.6安装流程.docx

    CentOS6.9的yum源

    CentOS6.9安装的yum源 一不小心删除yum源后重新安装的文件

    CentOS 7 yum源安装软件包

    # 删除redhat自带的yum包 rpm -qa|grep yum|xargs rpm -e --nodeps...rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm yum-3.4.3-150.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm

    centos6 yum 源

    centos6_64 yum配置,一键搞定.centos6_64 yum配置,一键搞定

    2-CentOS6安装MySQL5.71

    2-CentOS6安装MySQL5.71

    centos9ISO镜像及yum源配置文件

    centos9_StreamISO镜像及yum源配置文件和配置方法

    centos安装oracle11g

    在centos下安装oracle11g 使用yum源进行搭建 包括配置监听

    CentOS5.6安装手册V1

    CentOS5.6安装手册 CentOS (Commnity Enterprise Operating System)是Linux发行版之一,它是来自于Red Hat Enterprise Linux依照开放源代码规定释出的源代码所编译而成。

    CentOS操作系统安装教程

    CentOS全名为“社区企业操作系统”(Community Enterprise Operating System),是以红帽(Red Hat)公司所发布的源代码原件重建“红帽企业版LINUX”Red Hat Enterprise Linux的翻版,并修正了已经发现了的RedHat的bug。...

    使用CentOS安装盘在局域网中设置CentOS源.docx

    使用CentOS安装盘在局域网中设置CentOS源.docx

    CentOS操作系统的简介与安装、CentOS操作系统的安装教学课件.pptx

    指定安装源、定制要安装的软件包 设置网络地址、管理员口令 软件包复制及安装过程(需5~20分钟) SecureCRT远程终端软件 6 SecureCRT远程终端软件 SecureCRT SecureCRT是一款支持SSH(SSH1和SSH2)的终端仿真程序,...

    CentOS4安装详解

    CentOS(Community ENTerprise Operating System)是Linux发行版之一,它是来自于Red Hat Enterprise Linux依照开放源代码规定释出的源代码所编译而成。由于出自同样的源代码,因此有些要求高度稳定性的服务器以...

    libuv在centos下的编译安装.pdf

    libuv在centos下的编译安装 主要章节: 一、 工具安装 二、 下载libuv源代码 三、 编译安装libuv 四、 测试验证

    Centos 7 安装图形界面.docx

    本文档是为了那些安装了Centos7 mini版本的童鞋提供的,因为Centos7 mini最小安装是不提供桌面环境和组件,但是某些环境需要安装图形界面,方便童鞋操作,本文档讲述了如何通过配置本地yum源安装图形界面。

    Centos6.3 yum安装lamp架构

    Centos6.3 yum安装lamp架构

    centos7 yum安装redis配置密码及简单使用

    1、安装epel-release (建议使用国内阿里云源) #下载wget,备份当前源 yum install wget -y mv /etc/yum.repo.d/*.repo /tmp #下载阿里云源和epel源 wget -O /etc/yum.repos.d/CentOS-Base.repo ...

    CentOS7.x服务器MySQL5.7数据库Yum源安装包

    CentOS7.x服务器MySQL5.7数据库Yum源安装包,可以支持直接yum安装更新MySQL

    CentOS-Base.repo,centos6可用源

    centos6.X从2020年11月底开始已经没有可用源了,在本地物理机,本地虚拟机都无法使用yum安装,非常不方便,为此特意解决了centos6的源问题,亲测可用,用好了希望给与好评!

    CentOS本地源设置

    CentOS本地源设置帮助大家在无网络状态下安装软件

    CentOS 7 2009版镜像文件,内附下载安装全套教程

    CentOS 7 2009版镜像文件,内附下载安装全套教程 CentOS 7是CentOS项目发布的开源类服务器操作系统,于2014年7月7日正式发布。 [1] CentOS 7是一个企业级的Linux发行版本,它源于RedHat免费公开的源代码进行再发行...

Global site tag (gtag.js) - Google Analytics