使用redhat6.0 系统在线安装时提示This system is not registered with RHN.如下:
[root@localhost ~]# yum install gcc
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package httpd available.
Nothing to do
解决方案:
1.卸载redhat自带的yum组件
[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps
2.安装centos的yum包
# wget http://mirror.centos.org/centos/6/os/i386/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
# wget http://mirror.centos.org/centos/6/os/i386/Packages/yum-metadata-parser-1.1.2-16.el6.i686.rpm
# wget http://mirror.centos.org/centos/6/os/i386/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
# wget http://mirror.centos.org/centos/6/os/i386/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
#rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
#rpm -ivh yum-metadata-parser-1.1.2-16.el6.i686.rpm
#rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
注意最后两个包必需同时安装,否则会相互依赖
3. 下载更新源,并存放在系统目录中
[root@localhost ~]# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
[root@localhost ~]#mv CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo
4.生成缓存并进行安装
[root@localhost ~]# yum makecache
至此可以使用yum了。
补充更改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文件中即可(已经修改好)
#########################################################################
# 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
#########################################################################
清理yum缓存
# yum clean all
# yum makecache #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度
# yum install vim* #测试域名是否可用
相关推荐
linux安装yum对应python2.7.5包
linux安装yum用到包,网上的都是老版本的,且有些包不容易找,我包包整合一起了,根据提示依赖的先后顺序安装即可,亲测有效
RHEL Linux 安装yum源详细步骤(包含源包链接),非常详细。
Linux安装yum起因过程完全卸载自带的python、yum下载依赖安装依赖更新yum源 起因 之前安装了python3,不小心执行了标题1的卸载命令,没想到yum是用python2做的,python3解析不了python2的语法。导致yum用不了了。没...
Yum是什么,Yum安装,Yum配置,Yum安装应用,Yum指令详解.
oracle安装教程之Linux更换yum源
centos 和 linux 6.5 yum包,支持在linux6.5上安装下列三个包。
有可能有的依赖解决不了,可以去另一个人那里看看,他的资源比较好用,本资源不需要积分也可以自行去https://vault.centos.org网站下载,各种版本的都有...这是我以前使用的别人的rpm包我是7版本的红帽Linux,亲测可用
此包包含centOs相关知识的4天整套课程,yum源生源 yum制定源以及原代码搭建lamp,lnmp环境的搭建和Nginx的安装
Oracle Linux更新Yum源还是挺方便的,比Red Hat省事很多,而且在6.3的版本中,默认已经有重新编译可用的Yum了。
linux下如何彻底卸载RPM或yum安装的mysql
Linux-yum安装配置Linux-yum安装配置Linux-yum安装配置Linux-yum安装配置Linux-yum安装配置Linux-yum安装配置Linux-yum安装配置
Linux yum安装所需各种软件,完整。供yum安装使用。。
Linux更换yum源的图文完整教程,及其更换yum源所需要使用到的所有包。yum源就是一个软件集合地,你只需要搜索并安装你想要的软件,它会帮你解决大部分软件的依赖问题。
空的linux环境下如何搭建本地yum源以及编译环境gcc的详细步骤 有了它才可以使用yum、make、install命令
redhat linux 配置yum详解
yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器。...yum提供了查找、安装、删除某一个、一组甚至全部软件包的命令,而且命令简洁而又好记。
LINUX安装32位运行库【LINUX配置YUM源的几种办法】
suselinux安装详细介绍,特别包括了对分区的介绍,适合参考。