湘潭网站建设方案表格,推荐响应式网站建设,软件前端开发需要学什么,上海开发公司2019独角兽企业重金招聘Python工程师标准 1.为什么要替换 redhat系统使用yum命令安装软件时会出现This system is not registered with RHN. RHN support will be disabled. 原因是redhat的yum安装软件需要注册#xff0c;是收费的。而centos的yum源是免费的。这… 2019独角兽企业重金招聘Python工程师标准 1.为什么要替换 redhat系统使用yum命令安装软件时会出现This system is not registered with RHN. RHN support will be disabled. 原因是redhat的yum安装软件需要注册是收费的。而centos的yum源是免费的。这时就需要替换掉当前的yum换成centos的yum 2.替换前准备 明确当前系统的版本比如我的是redhat 7。为什么要明确当前系统的版本因为yum软件需要依赖其他软件而其他软件往往都是已经在当前系统上安装过的。当你替换centos版本的yum时很可能centos的yum所依赖的软件版本不匹配到那时就麻烦了。我们不可能根据提示将当前系统已经安装的其他软件都一 一卸载然后换成centos yum依赖的其他的软件这样太费事。 下面注意点是实际得出来的。 1.明确当前的python版本。redhat7默认的python版本是2.6 centos6.5和centos6.5的依赖的python版本也是2.6 centos7依赖的python版本是2.7 2.找准当前系统对应的centos的相关软件原则之一就是尽量少的替换当前系统的软件。此时我只需要替换相关的yum软件包其他的软件包尽量少替换。 3. redhat 7--可以替换centos6.5 和centos6.8版本的yum软件 3.替换步骤 3.1.查看redhat当前的yum相关包 rpm -qa | grep yum 3.2 .删除yum相关包 rpm -e yum --nodeps 3.3.下载centos相关yum包- -yum包的安装依赖python,可以根据系统当前python版本决定安装centos版本的yum包 从http://mirrors.163.com/centos/7/os/x86_64/Packages下载 依赖pythoon2.7版本 http://mirrors.163.com/centos/6.8/os/x86_64/Packages/ 下载对应centos6.8版本的 根据下面列出的rpm下载即可版本可能有些许差别 yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-utils-1.1.30-37.el6.noarch.rpm yum-updateonboot-1.1.30-37.el6.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm yum-3.2.29-73.el6.centos.noarch.rpm 需要的依赖python-urlgrabber-3.9.1-11.el6.noarch.rpm 我的系统已经存在python-urlgrabber-3.9.1-9.el6.noarch但是版本太低 需要卸载 然后安装3.9.1-11版本 rpm -e --nodeps python-urlgrabber-3.9.1-9.el6.noarch pm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm 4.安装下载下来的yum包 rpm -ivh yum-* 报错大部分原因是依赖的版本问题。当前系统版本太低如果依赖的版本太低的rpm很多建议选择centos版本相对低写的yum相关包 ----安装报错 warning: yum-3.2.29-73.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY error: Failed dependencies: python-urlgrabber 3.9.1-10 is needed by yum-3.2.29-73.el6.centos.noarch 3.5.配置/ect/yum.resp.d/CentOS-Base.repo:注如果用的是6.5版本的将6.8全部替换成6.5即可 [base]
nameCentOS-6.8 - Base - 163.com
baseurlhttp://mirrors.163.com/centos/6.8/os/$basearch/
#mirrorlisthttp://mirrorlist.centos.org/?release6.8arch$basearchrepoos
gpgcheck1
gpgkeyhttp://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#released updates
[updates]
nameCentOS-6.8 - Updates - 163.com
baseurlhttp://mirrors.163.com/centos/6.8/updates/$basearch/
#mirrorlisthttp://mirrorlist.centos.org/?release6.8arch$basearchrepoupdates
gpgcheck1
gpgkeyhttp://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that may be useful
[extras]
nameCentOS-6.8 - Extras - 163.com
baseurlhttp://mirrors.163.com/centos/6.8/extras/$basearch/
#mirrorlisthttp://mirrorlist.centos.org/?release6.8arch$basearchrepoextras
gpgcheck1
gpgkeyhttp://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages
[centosplus]
nameCentOS-6.8 - Plus - 163.com
baseurlhttp://mirrors.163.com/centos/6.8/centosplus/$basearch/
#mirrorlisthttp://mirrorlist.centos.org/?release6.8arch$basearchrepocentosplus
gpgcheck1
enabled0
gpgkeyhttp://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users
[contrib]
nameCentOS-6.8 - Contrib - 163.com
baseurlhttp://mirrors.163.com/centos/6.8/contrib/$basearch/
#mirrorlisthttp://mirrorlist.centos.org/?release6.8arch$basearchrepocontrib
gpgcheck1
enabled0
gpgkeyhttp://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 转载于:https://my.oschina.net/yibuliushen/blog/870125