发布时间:2018-12-07 20:48:55编辑:丝画阁阅读(720)
redhat 的更新包只对注册的用户生效,所以我们自己手动更改成CentOS 的更新包,CentOS几乎和redhat是一样的,所以无需担心软件包是否可安装,安装之后是否有问题。
因为redhat 原本的yum 没有注册为redhat用户是用不了的。
rpm -aq|grep yum|xargs rpm -e --nodeps rpm -aq|grep python-iniparse|xargs rpm -e --nodeps
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-8.el7.noarch.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-45.el7.noarch.rpm
rpm -ivh *.rpm
如果出现依赖包的问题或者包冲突的问题,可以添加以下两个参数,进行强迫安装。
--force 即使覆盖属于其它包的文件也强迫安装 --nodeps 如果该RPM包的安装依赖其它包,即使其它包没装,也强迫安装。 rpm -ivh --force --nodeps yum* 最终的强制安装指令
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo sed -i 's/$releasever/7/g' /etc/yum.repos.d/CentOS-Base.repo yum clean all yum list
[base] name=CentOS-7 - Base - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/7/os/$basearch/ http://mirrors.aliyuncs.com/centos/7/os/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/7/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #released updates [updates] name=CentOS-7 - Updates - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/7/updates/$basearch/ http://mirrors.aliyuncs.com/centos/7/updates/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/7/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful [extras] name=CentOS-7 - Extras - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/7/extras/$basearch/ http://mirrors.aliyuncs.com/centos/7/extras/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/7/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-7 - Plus - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/7/centosplus/$basearch/ http://mirrors.aliyuncs.com/centos/7/centosplus/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/7/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #contrib - packages by Centos Users [contrib] name=CentOS-7 - Contrib - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/7/contrib/$basearch/ http://mirrors.aliyuncs.com/centos/7/contrib/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/7/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
关键字:
上一篇:Linux系统的命令应该如何记
下一篇:一张图解析nginx架构
本站部分内容来源网络及网友上传,本站未必能一一鉴别其是否为公共版权或其版权归属,如果您认为侵犯您的权利,本站将表示非常抱歉!
请您速联系本站,本站一经核实,立即删除。删文删帖联系【2789291421@qq.com】