当前位置:首页 > 开发 > 操作系统 > 正文

CentOS源安装

发表于: 2014-06-28   作者:随便小屋   来源:转载   浏览:
摘要: 一、安装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]

一、安装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源安装

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
参照 http://www.linuxidc.com/Linux/2015-03/114690.htm     http://www.cnblogs.com/mchina/
前言: 使用centos是为了学习Linux,而我要学习Linux,就要安装需要用的软件,有可能是gtk,有可能是
安装注意 本人在个人笔记本 i5 处理器安装centos6.5/6.7 32bit/64bit 都失败,后来发现错误是由于安
本实验的目的是使用CentOS的两张DVD安装光盘作为本地软件源,避免执行yum安装命令时每次都要从网络
一准备安装CentOS 6 1.CentOS简介 CentOS 是甚么? CentOS 是一个基于Red Hat 企业级 Linux 提供的
CentOS或者RHEL 系统环境下,RPM 的依赖性是个很让人头疼的问题。每次系统安装完成过后,想再装一个
一、yum 简介   yum,是Yellow dog Updater, Modified 的简称,是杜克大学为了提高RPM 软件包安装
一、yum 简介   yum,是Yellow dog Updater, Modified 的简称,是杜克大学为了提高RPM 软件包安装
CentOS yum 源的配置与使用 一、yum 简介   yum,是Yellow dog Updater, Modified 的简称,是杜克
一、yum 简介   yum,是Yellow dog Updater, Modified 的简称,是杜克大学为了提高RPM 软件包安装
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号