# #引言 # #: since the Yum online update for Rhel is chargeable, it cannot be used if not registered, that is, the software cannot be installed online. In order to install the software with Yum, we can use the Yum source of CentOS, as described below.
First, delete the original Rhel yum
[email protected] ~]# rpm-aq|grep yum|xargs rpm-e--nodeps # #删除
Ii. Download the Yum installation package for CentOS
[email protected] ~]# wget http://vault.centos.org/6.0/os/x86_64/Packages/ python-iniparse-0.3.1-2.1.el6.noarch.rpm
[email protected] ~]# wget http://vault.centos.org/6.0/os/x86_64/Packages/ yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm
[email protected] ~]# wget http://vault.centos.org/6.0/os/x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm
[email protected] ~]# wget http://vault.centos.org/6.0/os/x86_64/Packages/ yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm
Third, install the Yum package
[email protected] ~]# RPM-IVH python-iniparse-0.3.1-2.1.el6.noarch.rpm
[email protected] ~]# RPM-IVH yum-metadata-parser-1.1.2-14.1.el6.i686.rpm
# # # #注意下面这两个软件包必须一起安装 # #
[email protected] ~]# RPM-IVH yum-3.2.27-14.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm
Iv. change the local Yum source and use the Centos,yum source of NetEase
[email protected] ~]# cd/etc/yum.repos.d/ # #切换到yum源配置目录
# # #下载网易yum源
[email protected] yum.repos.d]# wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo
[[email protected] yum.repos.d]# VI centos6-base-163.repo # #使用vi编辑yum配置文件将文件中 $releasever replaced by 6. In the last-line mode, execute the command in parentheses (:% s/$releasever/6/g) to replace 15 altogether.
Five, clear Yum cache
[email protected] yum.repos.d]# yum clean all # #清除缓存
[email protected] yum.repos.d]# yum makecache # #将服务器上的软件包缓存到本地
[email protected] yum.repos.d]# yum-y install httpd # #测试安装httpd服务
Loaded Plugins:fastestmirror, Product-id, Subscription-manager
This system isn't registered to Red Hat Subscription Management. You can use the Subscription-manager to register.
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--Running Transaction check
--Processing DEPENDENCY:HTTPD = 2.2.15-29.el6_4 for package:httpd-devel-2.2.15-29.el6_4.x86_64
---> Package httpd.x86_64 0:2.2.15-39.el6.centos Set updated
--Processing Dependency:httpd-tools = 2.2.15-39.el6.centos for package:httpd-2.2.15-39.el6.centos.x86_64
--Running Transaction check
---> Package httpd-devel.x86_64 0:2.2.15-39.el6.centos Set updated
---> Package httpd-tools.x86_64 0:2.2.15-39.el6.centos Set updated
--Finished Dependency Resolution
Dependencies resolved
=============================================================================================================== =======================
Package Arch Version Repository Size
=============================================================================================================== =======================
Updating:
httpd x86_64 2.2.15-39.el6.centos Base 825 K
Updating for dependencies:
Httpd-devel x86_64 2.2.15-39.el6.centos Base K
Httpd-tools x86_64 2.2.15-39.el6.centos Base K
Transaction Summary
=============================================================================================================== =======================
Install 0 Package (s)
Upgrade 3 Package (s)
Total Download size:1.0 M
Downloading Packages:
(1/3): httpd-2.2.15-39.el6.centos.x86_64.rpm | 825 KB 00:02
(2/3): httpd-devel-2.2.15-39.el6.centos.x86_64.rpm | KB 00:00
(3/3): httpd-tools-2.2.15-39.el6.centos.x86_64.rpm | KB 00:00
--------------------------------------------------------------------------------------------------------------- -----------------------
Total 277 kb/s | 1.0 MB 00:03
Warning:rpmts_HdrFromFdno:Header V3 rsa/sha1 Signature, key ID C105b9de:nokey
Base/gpgkey | 3.3 KB 00:00 ...
Importing GPG key 0xc105b9de "CentOS-6 key (CentOS 6 official Signing key) <[email protected]>" from http://mirror.c Entos.org/centos/rpm-gpg-key-centos-6
Running Rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning:rpmdb altered outside of Yum.
Packagekit-0.5.8-21.el6.x86_64 has missing requires of Packagekit-yum = (' 0 ', ' 0.5.8 ', ' 21.el6 ')
Packagekit-0.5.8-21.el6.x86_64 has missing requires of Packagekit-yum-plugin = (' 0 ', ' 0.5.8 ', ' 21.el6 ')
Rhn-check-1.0.0.1-16.el6.noarch has missing requires of Yum-rhn-plugin >= (' 0 ', ' 0.9.1 ', ' 35 ')
Updating:httpd-tools-2.2.15-39.el6.centos.x86_64 1/6
Updating:httpd-2.2.15-39.el6.centos.x86_64 2/6
Updating:httpd-devel-2.2.15-39.el6.centos.x86_64 3/6
Cleanup:httpd-devel-2.2.15-29.el6_4.x86_64 4/6
Cleanup:httpd-2.2.15-29.el6_4.x86_64 5/6
Cleanup:httpd-tools-2.2.15-29.el6_4.x86_64 6/6
Updated:
Httpd.x86_64 0:2.2.15-39.el6.centos
Dependency Updated:
httpd-devel.x86_64 0:2.2.15-39.el6.centos httpd-tools.x86_64 0:2.2.15-39.el6.centos
complete!
######## #至此RHEL的yum就更改为Centos的yum源 ##########
This article is from the "Linux" blog, so be sure to keep this source http://wangenzhi.blog.51cto.com/9214174/1671110
RHEL6.5 System Replace the CentOS system Yum source