RedHat Enterprise Linux 6.4 使用 Centos 6 的yum 源问题
(2015-04-09 17:09:11)
标签:
yum源
youcanusesubscriptio
RedHat Enterprise Linux 6.4 使用Centos 6 的yum
源问题
2015.04.09
一、问题描述
有时在使用RedHat 系统进行安装某些软件时,会出现如下提示:
This system is not registered to Red Hat Subscription Management.
You can use
subscription-manager to register. Setting up Install Process
Nothing to do
二、问题解释
由于redhat 的yum 源需要注册费,而一般我们使用的redhat 系统仅仅是实验用处,没有必
要通过正规手段解决。所以使用如下方法解决yum 源的问题。
三、问题解决
查看内核:
[root@dev5 yum.repos.d]# cat /proc/version
Linux version 2.6.32-431.el6.x86_64
(mockbuild@x86-023.build.eng.bos.redhat.com) (gcc
version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Sun Nov 10
22:19:54 EST 2013
[root@dev5 yum.repos.d]# uname -r
2.6.32-431.el6.x86_64
[root@dev5 yum.repos.d]# uname -a
Linux dev5 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST
2013 x86_64 x86_64
x86_64 GNU/Linux
查看版本:
[root@dev5 yum.repos.d]# lsb_release -a
LSB
Version:
:base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd
64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.5
(Santiago)
Release: 6.5
Codename: Santiago
[root@dev5 yum.repos.d]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel \r on an \m
[root@dev5 yum.repos.d]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
[root@dev5 yum.repos.d]# file /bin/bash
/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses
shared libs), for GNU/Linux 2.6.18, stripped
[root@dev5 yum.repos.d]# file /bin/cat
/bin/cat: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared
libs), for GNU/Linux 2.6.18, stripped
ONE、下载安装包并安装
http://www.163disk.com/fileview_2535033.html
解压后,得到四个rpm 包
python-iniparse-0.3.1-2.1.el6.noarch.rpm
yum-3.2.29-40.el6.centos.noarch.rpm
yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
卸载RedHat 自带的yum
rpm -qa | grep yum | xargs rpm -e --nodeps
安装上面那四个rpm
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-40.el6.centos.noarch.rpm
yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
TWO、下载yum 源文件
http://www.163disk.com/fileview_2535034.html
得到
rhel-source.repo
把它放到/etc/yum.repo.d 中,如果有原来的yum 源文件,请更改掉原来的yum 源的文件名,
把下载下来的改成系统默认的yum 源文件名。
THREE、
去掉原来的缓存yum clean all
获取yum 列表yum makecache
成功现象:
[root@dev5 yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, product-id,
subscription-manager
This system is not registered to Red Hat Subscription Management.
You can use
subscription-manager to register.
Determining fastest mirrors
base | 3.7 kB 00:00
base/group_gz | 216 kB 00:00
base/filelists_db | 6.1 MB 00:17
base/primary_db | 4.6 MB 00:13
base/other_db | 2.8 MB 00:08
extras | 3.4 kB 00:00
extras/filelists_db | 31 kB 00:00
extras/prestodelta | 605 B 00:00
extras/primary_db | 30 kB 00:00
extras/other_db | 37 kB 00:00
updates | 3.4 kB 00:00
updates/filelists_db | 1.8 MB 00:05
updates/prestodelta | 258 kB 00:00
updates/primary_db | 2.7 MB 00:07
updates/other_db | 25 MB 01:10
xcat-2-core | 2.5 kB 00:00 ...
xcat-2-core/filelists_db | 22 kB 00:00 ...
xcat-2-core/primary_db | 24 kB 00:00 ...
xcat-2-core/other_db | 1.9 kB 00:00 ...
xcat-dep | 2.5 kB 00:00 ...
xcat-dep/filelists_db | 36 kB 00:00 ...
xcat-dep/primary_db | 27 kB 00:00 ...
xcat-dep/other_db | 13 kB 00:00 ...
Metadata Cache Created
注:
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/
现在就成功了!
分享:
喜欢
0
赠金笔
加载中,请稍候......
评论加载中,请稍候...
发评论
登录名: 密码: 找回密码 注册记住登录状态
昵 称:
评论并转载此博文
发评论
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。