RedHat5.4 使用 centOS5源更新
1.卸载HedHat5.4的yum命令
先查看RedHat上是否安装yum
删除所有的yum软件
rpm -qa | grep yum | xargs rpm -e --nodeps
2.下载新的yum包
wget http://vault.centos.org/5.4/os/x86_64/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
wget http://vault.centos.org/5.4/os/x86_64/CentOS/yum-3.2.22-20.el5.centos.noarch.rpm
wget http://vault.centos.org/5.4/os/x86_64/CentOS/yum-updatesd-0.9-2.el5.noarch.rpm
wget http://vault.centos.org/5.4/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm
# rpm -ivh yum-* #安装
# rpm -qa yum #查看是否已经安装上
注意:yum和yum-fastestmirror相互依赖,所以同时安装即可。
- 在CentOS下有的时候用yum安装软件的时候最后会提示:
- warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID*****
- 这是由于yum安装了旧版本的GPG keys造成的,解决办法就是
- 下载并导入Key
- cd /etc/pki/rpm-gpg
- wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
- rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
- 或者 一条 rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
检测安装的 yum 是否有问题,执行命令进行测试:
yum clean all 重建yum缓存
yum makecache
外网的yum源
vim /etc/yum.repos.d/CentOS-Base.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-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://vault.centos.org/5.11/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=http://vault.centos.org/5.11/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=http://vault.centos.org/5.11/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
baseurl=http://vault.centos.org/5.11/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
baseurl=http://vault.centos.org/5.11/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5</span></strong></span>
无视依赖关系安装 --force --nodeps
# rpm -ivh db4-devel-4.3.29-9.fc6.i386.rpm --force --nodeps
https://blog.csdn.net/m0_37886429/article/details/75009382
最新文章
- OSI七层模型及TCP/IP四层模型
- (转)整体把握jQuery -jQuery 的原型关系图
- 总有一项适合你:联想 Miix2 8寸版触摸屏失灵的各项解决方案
- linux修改主机名的方法
- 2015年8月18日,杨学明老师《技术部门的绩效管理提升(研讨会)》在中国科学院下属机构CNNIC成功举办!
- Flash图表控件FusionCharts自定义图表y轴最大/最小值
- ace 读取excel
- IIS 7 WAS服务不可用
- Jquery 获取文件内容
- How do disable paging by swiping with finger in ViewPager but still be able to swipe programmatically?
- 自动发布工具版本从python2升级成python3后遇到的种种问题(涉及paramiko,Crypto,zipfile等等)
- vultr vps官网改版免费注册教程(最新优惠码)
- 深入理解null的原理
- 深入Redis持久化
- tp5生成6位不重复验证码
- JNI内存泄露JNI ERROR (app bug): local reference table overflow (max=512)
- webpack多页面配置
- 【JVM】jvm虚拟机参数解析
- windows 10 专业版 激活
- springmvc整合mybatis 配置文件