centos的源可作为rhel的源
可以完全把centos源的配置文件拿来给rhel用,过程入下:
cd /etc/yum.repos.d
cp rhel_local.repo rhel_local.repo.old
wget http://centos.ustc.edu.cn/CentOS-Base.repo.5
mv CentOS-Base.repo.5 rhel_local.repo
rpm –import http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
这时运行yum会出错:
http://centos.ustc.edu.cn/centos/5Server/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
于是将rhel_local.repo中的$releasever全改为5,再运行yum就可以了
后记:
这样运行yum update还是不行,会出错:
...
--> Processing Conflict: yum conflicts yum-rhn-plugin < 0.5.2-1.el5
--> Finished Dependency Resolution
Error: yum conflicts with yum-rhn-plugin < 0.5.2-1.el5
解决方法是把rhel自带的yum相关包都卸载掉(yum-rhn-plugin这个包当然包含于其中),然后装上新的yum,就可以利用yum让rhel使用centos的源进行升级了
Labels: Linux, Operation and Maintenance
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home