如何解决 yum安装出现This system is not registered with RHN
答案:1 悬赏:10 手机版
解决时间 2021-01-07 16:35
- 提问者网友:疯孩纸
- 2021-01-07 05:33
如何解决 yum安装出现This system is not registered with RHN
最佳答案
- 五星知识达人网友:十年萤火照君眠
- 2021-01-07 06:09
1.卸载redhat自带的yum组件
[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps
2.安装centos的yum包
[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm
[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-37.el5.centos.noarch.rpm
[root@localhost ~]# rpm -ivh *.rpm
warning: yum-3.2.22-37.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:yum-metadata-parser ########################################### [ 33%]
2:yum-fastestmirror ########################################### [ 67%]
3:yum ########################################### [100%]
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
[root@localhost ~]# yum install httpd
[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps
2.安装centos的yum包
[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm
[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-37.el5.centos.noarch.rpm
[root@localhost ~]# rpm -ivh *.rpm
warning: yum-3.2.22-37.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:yum-metadata-parser ########################################### [ 33%]
2:yum-fastestmirror ########################################### [ 67%]
3:yum ########################################### [100%]
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
[root@localhost ~]# yum install httpd
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯