RHEL 6.3使用CentOS yum源 (redhat yum安装失败)
由于Redhat的yum在线更新是收费的,如果没有注册的话是不能使用的,即不能在线安装软件。所以yum install 命令每次都安装失败
下面介绍一种更改yum源的方式:
系统说明:
系统:Red Hat Enterprise Linux Server 6.3
内核:Linux 2.6.32-279.el6.x86_64
1、删除RHEL原有的yum
rpm
-aq|grep yum|xargs rpm -e --nodeps #删除
2、下载新的yum安装包 #这里我们使用CentOS的yum源
wget
http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget
http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-60.el6.centos.noarch.rpm
wget
http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
(提示:如果下载时提示404找不到错误,请访问http://mirrors.163.com/centos/6/os/x86_64/Packages/,手动查找上面四个包,有时候版本会有点小偏差)
3、安装yum软件包
rpm -ivh
python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh
yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh yum-3.2.29-60.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
(这里要注意的是:最后两个安装包要放在一起同时安装,否则会提示相互依赖,安装失败。)
4、更改yum源 #我们使用网易的CentOS镜像源
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
vi CentOS6-Base-163.repo #编辑文件
把文件里面的$releasever全部替换为版本号,即6 最后保存!
或者直接把下面的内存拷贝到CentOS6-Base-163.repo文件中即可
(已经修改好,不用下载直接新建CentOS6-Base-163.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-6 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
5、收尾,测试YUM 是否可用
yum clean all #清理yum缓存
yum makecache #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度
yum install vim* #测试yum是否可用
RHEL 6.3使用CentOS yum源 (redhat yum安装失败)的更多相关文章
- Centos 7源码编译安装 php7.1 之生产篇
Centos 7源码编译安装 php7.1 之生产篇 Published 2017年4月30日 by Node Cloud 介绍: 久闻php7的速度以及性能那可是比php5系列的任何一版本都要快,具 ...
- RedHat6使用CentOS yum源 换yum
yum 简单介绍一下 yum 主要功能是更方便的添加/删除/更新RPM 包,自动解决包的倚赖性问题,便于管理大量系统的更新问题. yum 可以同时配置多个资源库(Repository),简洁的配置文件 ...
- CentOS 6.4安装本地yum源,并安装X Window System
1.为DVD创建一个挂载目录 [root@localhost ~]# mkdir /media/CentOS 2.在Linux下挂载CentOS DVD(虚拟机挂载DVD不说了,应该都会) [root ...
- docker探索-CentOS7中配置Docker的yum源并升级安装docker1.13(十)
此处使用的是CentOS7,内核版本为 [root@localhost ~]# uname -r -.el7.x86_64 该版本下,配置了yum的源为阿里的镜像源,具体的配置方法可以参见阿里镜像源配 ...
- Linux yum源码包安装和卸载
Linux 下的绝大多数源码包都是用 C 语言编写的,还有少部分是用 C++ 等其他程序语言编写的.所以,要想安装源码包,必须安装 C 语言编译器 gcc(如果是用 C++ 编写的程序,则还需要安装 ...
- Centos-7修改yum源(阿里yum源)
国外地址yum源下载慢,下到一半就断了,就这个原因就修改它为国内yum源地址 国内yum源: 阿里centos7 yum源:http://mirrors.aliyun.com/repo/Centos- ...
- Cent OS 7 本地yum源配置与安装
一.本地yum源 1.添加一个新的yum源配置文件dvd.repo(文件名字自定义) vi etc/yum.repos.d 添加新的内容: name=rhel_dvd ...
- 自建yum源及分组安装
最近在研究一套自动化运维方向的框架,在想到远程安装软件包的时候,觉得有yum支持会更方便一些.主要思路是把程序员写的代码或程序打包成rpm,然后提交到自建yum源,并实现按组安装,本地yum源实现步骤 ...
- centos 7 源码包安装、卸载nginx
1.源码包安装之前,首页安装依赖包 yum -y install gcc gcc-c++ make libtool zlib zlib-devel openssl openssl-devel pcre ...
- CentOS7.2+MySQL5.7_ yum源方式_ 安装配置教程
1)访问mysql官方网站 #访问网站 https://dev.mysql.com/downloads/file/?id=470281 2)下载安装包到linux #进入文件存放路径 cd /usr/ ...
随机推荐
- 【转】基于V4L2的视频驱动开发
编写基于V4L2视频驱动主要涉及到以下几个知识点:1> 摄像头方面的知识 要了解选用的摄像头的特性,包括访问控制方法.各种参数的配置方法.信号输出类型等.2> Camera解码器.控制器 ...
- poj 3311 Hie with the Pie(状态压缩dp)
Description The Pizazz Pizzeria prides itself or more (up to ) orders to be processed before he star ...
- hdu 5491 The Next(暴力枚举)
Problem Description Let L denote the number of 1s in integer D’s binary representation. Given two in ...
- MFC多线程内存泄漏问题&解决方法
在用visual studio进行界面编程时(如MFC),前台UI我们能够通过MFC的消息循环机制实现.而对于后台的数据处理.我们可能会用到多线程来处理. 那么对于大多数人(尤其是我这样的菜鸟),一个 ...
- WAS下获取包路径下所有类
最近做javaweb项目的混淆工作,用到proguard,该工具混淆.jar文件比较方便,故把所有项目代码和配置文件打成jar包, 生成的jar包经过proguard处理后,再次打包(解决progua ...
- 【Java基础】setter与getter方法
//下面代码实现设置和获取学生姓名和成绩. class lesson5homework { public static void main(String[] args) { TestCode TC=n ...
- css设置
box-size允许您以特定的方式定义匹配某个区域的特定元素. content-box(默认):宽度和高度分别应用到元素的内容框.在宽度和高度之外绘制元素的内边距和边框.border-box:为元素设 ...
- php单例设计模式
class car { static $obj = null; private function __construct(){} static function getObj(){ if(is_nul ...
- hadoop高可用集群搭建小结
hadoop高可用集群搭建小结1.Zookeeper集群搭建2.格式化Zookeeper集群 (注:在Zookeeper集群建立hadoop-ha,amenode的元数据)3.开启Journalmno ...
- HDU 5794 - A Simple Nim
题意: n堆石子,先拿光就赢,操作分为两种: 1.任意一堆中拿走任意颗石子 2.将任意一堆分成三小堆 ( 每堆至少一颗 ) 分析: 答案为每一堆的 ...