Redhat5-yum源无法使用的解决

YUM是Redhat Linux在线安装更新及软件的工具,但是这是RHEL5的收费功能,如果没有购买Redhat的服务时不能使用RHEL5的更新源的,会提示注册。

由于CentOS是从Redhat演化而来的免费Linux版本,因此可以利用CentOS的yum更新源来实现RHEL5的YUM功能。配置方法如下:

配置yum更新源

备份:mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.repo.bak

创建文件:vi /etc/yum.repos.d/rhel-debuginfo.repo

在新创建的文件例输入以下内容保存并退出

[base]
name=CentOS-5-Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#released updates
[update]
name=CentOS-5-Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5/updates/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#packages used/produced in the build but not released
[addons]
name=CentOS-5-Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
baseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that may be useful
[extras]
name=CentOS-5-Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
baseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5-Plus
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
baseurl=http://ftp.sjtu.edu.cn/centos/5/centosplus/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5-Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/5/contrib/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
# vi dag.repo
[dag]
name=Dag RPM Repository for RHEL5
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el5/en/$basearch/dag/
enabled=1
gpgcheck=0
gpgkey=http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt

使用:“yum install openssh*” 检测是否安装成功;显示如下图则表明安装成功yum源

时间: 2024-08-25 17:20:52

Redhat5-yum源无法使用的解决的相关文章

本地yum源无法使用 ,rpm --import public.gpg.key

一次重装CentOS7系统后,挂载光驱并制作成本地yum源却无法使用yum进行安装,这TM着实有点闹心.o(>﹏<)o 案发现场: [[email protected] ~]# yum -y install /mnt/Packages/vsftpd-3.0.2-22.el7.x86_64.rpm You have enabled checking of packages via GPG keys. This is a good thing.However, you do not have an

低版本的yum源无法使用

当你安装centos或者是linux低版本的系统时  配置本地iso为yum源 输入yum reppolist 提示:Another app is currently holding the yum lock; waiting for it to exit... 可能的原因是yum系统正在升级,yum被锁定了 可以杀死yum进程. 方法:rm -f /var/run/yum.pid 就可以了.

centos6.4的本地yum源配置

背景:在我们linux实际生产中,我们常常要去下载常用的一些软件,yum自动解决了软件之间的依赖关系,当然centos自带的yum源可以正常的使用,但是呢我们在自己的生产环境中一般都是在局域网里面,有几十台甚至上百台服务器,假如我们每台服务器都去官方的yum源下载的话会有以下几个问题: 1.局域网没联网,官方yum源无法使用! 2.对于我们公司的带宽消耗会很严重 带宽都是钱呀!! 3.速度不够快. 试验环境: 虚拟机VMware Workstation 12 player条件下 yum本地服务器

Linux下光盘yum源搭建及简单软件安装

Linux下软件安装包常见的有源码包.二进制包, 软件安装一般有以下几种方式:RPM包安装.yum安装.以及脚本安装. 严格来说,脚本安装并不是独立的一种安装方式,只是对Linux字符界面下软件复杂安装的一个简化版,将复杂的安装命令写在了一个脚本文件中,例如Nginx的安装.fail2ban<采用python脚本>的安装.有兴趣的话可以去查查资料. 接下来就开始正式的yum源的搭建. 环境:Windows 7环境下VMware10,Linux--->CentOS6.5 首先需要说明的是,

centos制作本地光盘yum源

centos将本地光盘做为yum源,方便解决依赖包问题: 1./etc/yum.repos.d目录下有两个文件:CentOS-Base.repo(联网yum安装).CentOS-Media.repo(本地yum源) vi   CentOS-Media.repo [c5-media] name=CentOS-$releasever - Media baseurl=file:///media/ 此处为挂载目录(挂载点) gpgcheck=1 #enabled=0 这个我注释掉了,不知道没有注释可以用

Linux YUM源的问题

目前大量的服务器上运行的各类linux的版本,以CentOS,RHEL为代表的系统安装完成之后,将会遇到的问题就是解决软件依赖性的问题.如果通过传统的编译安装和查找依赖关系包,步骤繁琐,切处理复杂.YUM源就是为了解决这类问题而产生的. 目前我们已知的国内比较常用的YUM源地址如163,上海交大等,国外的federal的epel项目组也是长使用的源 yum源的配置文件位于/etc/yum.repo.d目录下,配置文件以repo后缀结尾(配置文件的读取规则必须满足后缀名为.repo). 那么YUM

自建yum仓库yum源

目的:搭建自己的yum源主要是解决大批量服务器下载更新人互联网带宽占用问题及速度问题以及不能访问的问题. 服务端:  步骤如下: 一.创建一个目录,就是我们yum软件存放的目录 [[email protected] /application]#mkdir -p /application/yum/centos6.8/_64 二.安装一个软件,用来生产仓库环境,名字叫createrepo yum -y install createrepo -y 三.初始化仓库目录的索引文件 [[email prot

阿里云centos5升级yum源为6

升级后出现Errno -3] Error performing checksum 需要安装 python-hashlib Python 2.4 安装 hashlib 2012年11月13日 14:29:47 阅读数:3688 首先安装 python-devel, hashlib 编译的时候需要: [plain] view plain copy $ sudo yum install python-devel 下载 hashlib 并安装: [plain] view plain copy $ wge

CentOS7.2配置本地yum源

1.检查是否有本地yum源 1)检查是否能连网 ping www.baidu.com 2)检查是否有本地yum源 yum list 2.挂载镜像文件 以上检查,说明确实是内网,也确实没有本地yum源,那我们就需要配置一个本地yum源,去解决某些软件的依赖安装 1)查看操作系统 cat /etc/redhat-release 2)上传相应的镜像文件至服务器 3)挂载镜像文件 将刚刚上传的镜像文件挂载到/home/iso/目录下(你可以挂载到自己的目录下,如果是挂载到镜像文件的路径,之前的镜像文件会