`
kankan1218
  • 浏览: 277804 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

让RHEL5也能YUM Centos5.1(解决This system is not registered with RHN.)

阅读更多
1.卸载rhel的yum相关的包

[root@virhost ~]# rpm -qa|grep yum
yum-updatesd-3.0.1-5.el5
yum-3.0.1-5.el5
yum-rhn-plugin-0.5.2-3.el5
yum-metadata-parser-1.0-8.fc6
yum-security-1.0.4-3.el5
[root@virhost ~]# yum update
Loading "rhnplugin" plugin
Loading "installonlyn" plugin
Loading "security" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Update Process
Setting up repositories
No Repositories Available to Set Up
Reading repository metadata in from local files
Skipping security plugin, no data
No Packages marked for Update/Obsoletion
[root@virhost ~]# rpm -e yum-3.0.1-5.el5 --nodeps
[root@virhost ~]# rpm -qa|grep yum
yum-metadata-parser-1.0-8.fc6
yum-updatesd-3.0.1-5.el5
yum-rhn-plugin-0.5.2-3.el5
yum-security-1.0.4-3.el5
[root@virhost ~]# rpm -e yum-updatesd-3.0.1-5.el5
[root@virhost ~]# rpm -e yum-rhn-plugin-0.5.2-3.el5
[root@virhost ~]# rpm -e yum-metadata-parser-1.0-8.fc6(后来测试这个不应该卸载)
[root@virhost ~]# rpm -e yum-security-1.0.4-3.el5


2.安装centos的源

http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.0.5-1.el5.centos.5.noarch.rpm
rpm -ivh yum-3.0.5-1.el5.centos.5.noarch.rpm

[root@virhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.0.5-

1.el5.centos.5.noarch.rpm
[root@virhost ~]# rpm -ivh yum-3.0.5-1.el5.centos.5.noarch.rpm
warning: yum-3.0.5-1.el5.centos.5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
        yum-metadata-parser is needed by yum-3.0.5-1.el5.centos.5.noarch
[root@virhost ~]# wget http://192.168.1.250/yum-metadata-parser-1.0-8.fc6.i386.rpm
--07:48:55-- http://192.168.1.250/yum-metadata-parser-1.0-8.fc6.i386.rpm
Connecting to 192.168.1.250:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:22950 (22K) [text/plain]
Saving to: `yum-metadata-parser-1.0-8.fc6.i386.rpm'

100%[==================================================================>] 22,950      --.-K/s   in

0.003s

07:48:55 (8.57 MB/s) - `yum-metadata-parser-1.0-8.fc6.i386.rpm' saved [22950/22950]

[root@virhost ~]# rpm -ivh yum-metadata-parser-1.0-8.fc6.i386.rpm
warning: yum-metadata-parser-1.0-8.fc6.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:yum-metadata-parser    ########################################### [100%]
[root@virhost ~]# rpm -ivh yum-3.0.5-1.el5.centos.5.noarch.rpm
warning: yum-3.0.5-1.el5.centos.5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing...                ########################################### [100%]
   1:yum                    ########################################### [100%]
由此看来yum-metadata-parser-1.0-8.fc6.i386.rpm这个包不应该删除那


[root@virhost ~]# cd /etc/yum.repos.d/
[root@virhost yum.repos.d]# ls
rhel-debuginfo.repo
[root@virhost yum.repos.d]# vi CentOS-Base.repo这个文件内如是下面的

[base]
name=CentOS-5.1 - Base
baseurl=http://mirror.tini4u.net/centos/5.1/os/$basearch/
http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
gpgcheck=0
gpgkey=http://centos.ustc.edu.cn/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-5.1 - Updates
baseurl=http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
gpgcheck=0
gpgkey=http://centos.ustc.edu.cn/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5


#packages used/produced in the build but not released
[addons]
name=CentOS-5.1 - Addons
baseurl=http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
gpgcheck=0
gpgkey=http://centos.ustc.edu.cn/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5


#additional packages that may be useful
[extras]
name=CentOS-5.1 - Extras
baseurl=http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
gpgcheck=0
gpgkey=http://centos.ustc.edu.cn/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages

[centosplus]
name=CentOS-5.1 ¨C Plus
baseurl=http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
gpgcheck=0
gpgkey=http://centos.ustc.edu.cn/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-5.1 - Contrib
baseurl=http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
http://centos.ustc.edu.cn/centos/5.1/os/$basearch/
gpgcheck=0
gpgkey=http://centos.ustc.edu.cn/centos/5.1/os/i386/RPM-GPG-KEY-CentOS-5
然后随便测试了一个命令
[root@virhost yum.repos.d]# rpm -qa|grep postfix
刚好系统没有装这个包
[root@virhost yum.repos.d]# yum install postfix
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
updates                   100% |=========================| 1.1 kB    00:00   
contrib                   100% |=========================| 1.1 kB    00:00   
centosplus                100% |=========================| 1.1 kB    00:01   
addons                    100% |=========================| 1.1 kB    00:00   
extras                    100% |=========================| 1.1 kB    00:00   
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 834 kB    00:03   
################################################## 2400/2400
primary.xml.gz            100% |=========================| 834 kB    00:08   
################################################## 2400/2400
primary.xml.gz            100% |=========================| 834 kB    00:08   
################################################## 2400/2400
primary.xml.gz            100% |=========================| 834 kB    00:04   
################################################## 2400/2400
primary.xml.gz            100% |=========================| 834 kB    00:08   
################################################## 2400/2400
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for postfix to pack into transaction set.
postfix-2.3.3-2.i386.rpm 100% |=========================| 41 kB    00:00   
---> Package postfix.i386 2:2.3.3-2 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
postfix                 i386       2:2.3.3-2        extras            3.6 M

Transaction Summary
=============================================================================
Install      1 Package(s)       
Update       0 Package(s)       
Remove       0 Package(s)       

Total download size: 3.6 M
Downloading Packages:
(1/1): postfix-2.3.3-2.i3 100% |=========================| 3.6 MB    00:43   
Running Transaction Test
warning: postfix-2.3.3-2: Header V3 DSA signature: NOKEY, key ID e8562897
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: postfix                      ######################### [1/1]

Installed: postfix.i386 2:2.3.3-2
Complete!

===========================================================================================================================

1。14.el5.centos.1.noarch.rpm

当你安装yum的时候提示依赖yum-fastestmirror,同时当你安装yum-fastestmirror的时候提示你依赖yum,相互依赖呀.没办法,只能两个一起安装了
[root@blinux ~]# rpm -ivh yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm yum-3.2.22-26.el5.centos.noarch.rpm

2。包的下载地址:
http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/
分享到:
评论

相关推荐

    RHEL5配置 CentOS YUM更新源

    本篇将详细介绍如何为CentOS配置YUM更新源,以便让RHEL5系统能够使用。 首先,我们需要了解YUM的工作原理。YUM通过连接到服务器上的软件仓库,检索软件包及其依赖关系,然后自动下载和安装。在RHEL5中,通常需要...

    rhel配置新的yum源

    在Red Hat Enterprise Linux (RHEL)系统中,`yum` 是一个重要的包管理工具,用于安装、更新和管理软件包。`yum` 全称是Yellowdog Updater, Modified,它通过与远程仓库(通常称为yum源)交互,提供了一种方便的方式...

    redhat6.1yum源更换为centOSyum源

    本话题主要关注如何将Red Hat Enterprise Linux 6.1(RHEL 6.1)的yum源更换为CentOS的yum源。RHEL与CentOS是高度兼容的,因为CentOS是对RHEL源代码的一个重新编译版,不带商业支持。因此,这种切换可以使得用户在...

    redhat更改为centOS-6.4 yum源相关安装包

    本话题聚焦于将Red Hat Enterprise Linux (RHEL) 更改为 CentOS 6.4 的过程,这涉及到更换YUM源以及安装相关包。以下是关于这个主题的详细知识点: 首先,Red Hat Enterprise Linux 和 CentOS 都是基于Linux内核的...

    yum依赖包.zip

    4. `yum-rhn-plugin-2.0.1-10.el7.noarch.rpm`:这个插件使得yum可以与Red Hat Network(RHN)进行交互,允许用户在没有订阅Red Hat Enterprise Linux的情况下,依然能够访问和管理RHN上的软件仓库。在非RHEL系统上...

    需要:libQt5WebKitWidgets.so.5()(64bit) >= 5.5

    --> 解决依赖关系完成 ...rhn-check-2.0.2-6.el7.noarch 有缺少的需求 yum-rhn-plugin >= ('0', '1.6.4', '1') ===========分割线=========== 使用yum install 进行安装,之后再安装teamviewer13

    yum配置元

    在Linux环境下,特别是Red Hat Enterprise Linux (RHEL)及其衍生版本(如CentOS)中,YUM(Yellowdog Updater Modified)是一个非常重要的软件包管理工具。它允许用户方便地安装、更新、卸载软件包,并且能够自动...

    redhat yum配置

    `yum`(Yellowdog Updater, Modified)是基于`rpm`包管理器的前端,它通过与软件仓库交互,自动解决软件依赖关系,简化了在RHEL及其克隆发行版如CentOS上的软件管理过程。`yum`的核心功能包括安装新软件包、更新现有...

    linux下配置yum源方法详解

    1.确保RHEL5中已经安装了yum [root@lvs-master ~]# rpm -qa |grep yum yum-metadata-parser-2-el5 yum-updatesd-9-el5 yum-22-el5 yum-security-16-el5 yum-rhn-plugin-4-el5 2.修改源配置文件 #vim /etc/yum....

    RedHat 5.4 Linux系统安装VisualBox虚拟机

    - 选择适用于Red Hat Enterprise Linux (RHEL) 5的64位版本进行下载,例如: - 下载链接:[http://download.virtualbox.org/virtualbox/4.2.6/VirtualBox-4.2-4.2.6_82870_el5-1.x86_64.rpm]...

    怎样给redhat 5.0安装GCC

    此外,由于RHEL默认的YUM源通常需要通过Red Hat Network(RHN)注册并付费才能使用,因此,为了绕过这一限制,我们需要移除原有的RHN插件,并导入CentOS的YUM源。 #### 删除RHN插件 在终端中,你需要以root用户...

    dell-satellite-sync

    戴尔提供了一种工具(dell-satellite-sync)将Dell OpenManage yum存储库导入RHN Satellite / Spacewalk服务器,并将注册的服务器订阅到相应的OpenManage频道。 但是,不支持CentOS。 在有针对CentOS 6的补丁程序,...

Global site tag (gtag.js) - Google Analytics