将red hat yum 改成 centos yum
没有注册的red hat在不能yum update,为了能update,下面修改red hat的yum 源
1:删除现有yum安装的rpm
rpm -aq|grep yum|xargs rpm -e --nodeps
2:下载yum安装包
cd /usr/tmp wget http://mirrors.163.com/centos/6.4/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm wget http://mirrors.163.com/centos/6.4/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm wget http://mirrors.163.com/centos/6.4/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm wget http://mirrors.163.com/centos/6.4/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
3:安装下载的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
4:更新repo文件
mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.repo.bak vi /etc/yum.repos.d/rhel-debuginfo.repo
将下面的内容覆盖到rhel-debuginfo.repo中
[base] name=CentOS-$releasever - Base baseurl=http://mirrors.163.com/centos/6.4/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates baseurl=http://mirrors.163.com/centos/6.4/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6 [extras] name=CentOS-$releasever - Extras baseurl=http://mirrors.163.com/centos/6.4/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6 [centosplus] name=CentOS-$releasever - Plus baseurl=http://mirrors.163.com/centos/6.4/centosplus/$basearch/ gpgcheck=1 enabled=0
5:清理
yum clean all
6:测试
yum install vim
相关推荐
yishouwangnian 2020-06-21
昭君出塞 2020-06-04
FCLAMP 2020-05-20
summerinsist 2020-08-21
深井兮兮 2020-04-23
sofast 2020-04-16
窃破天道 2020-07-18
OnMyHeart 2020-06-17
LychieFan 2020-06-16
服务器开发的日子 2020-06-14
Wytheme 2020-06-11
waitzkj 2020-06-09
邓博学习笔记 2020-06-08
secondid 2020-06-05
fushilin 2020-06-03
87901735 2020-06-02
heheeheh 2020-05-31