内容简介:RedHat yum源是收费的,没有注册的Redhat机器是不能使用yum源的。1、当前系统环境:系统版本:Red Hat Enterprise Linux Server release 7.3 (Maipo)
RedHat yum源是收费的,没有注册的Redhat机器是不能使用yum源的。
1、当前系统环境:
系统版本:Red Hat Enterprise Linux Server release 7.3 (Maipo)
软件环境:系统默认是自带了yum程序的,需要卸载,安装CentOS的
2、更换yum源:
1) 卸载本地yum:
# rpm -qa|grep yum #查看本地yum
# rpm -qa|grep yum|xargs rpm -e --nodeps #卸载本地yum,不检查依赖性,卸载yum程序
# rpm -qa | grepPython-urlgrabber | xargs rpm -e --nodeps
2) 下载CentOS yum程序
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-161.el7.centos.noarch.rpm
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-50.el7.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命令下载,也可以用浏览器下载。rpm包下载地址http://mirrors.163.com/centos/7/os/x86_64/Packages/ ,包的版本会有更新,选择最新版本下载
安装CentOS yum程序
为避免他们之间互相依赖,三个程序一起安装
# rpm -ivh yum-3.4.3-161.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
安装报错,依赖软件版本不兼容,
警告:yum-3.4.3-161.el7.centos.noarch.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
错误:依赖检测失败:
python-urlgrabber >= 3.10-8 被 yum-3.4.3-161.el7.centos.noarch 需要
rpm >= 0:4.11.3-22 被 yum-3.4.3-161.el7.centos.noarch 需要
重新下载新版本的依赖软件,安装更新
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-4.11.3-35.el7.x86_64.rpm
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-libs-4.11.3-35.el7.x86_64.rpm
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-build-libs-4.11.3-35.el7.x86_64.rpm
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-python-4.11.3-35.el7.x86_64.rpm
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-chardet-2.2.1-1.el7_1.noarch.rpm
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-kitchen-1.1.1-5.el7.noarch.rpm
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-9.el7.noarch.rpm
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-4.11.3-35.el7.x86_64.rpm
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-sign-4.11.3-35.el7.x86_64.rpm
# wget http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-build-4.11.3-35.el7.x86_64.rpm
更新依赖软件:
# rpm –ivh python-*
# rpm -ivh libxml*
# rpm –Uvh rpm*
再次安装yum程序
# rpm -ivh yum-3.4.3-161.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
安装报错:
错误:依赖检测失败:
python-urlgrabber >= 3.10-8 被 yum-3.4.3-161.el7.centos.noarch 需要
Python-urlgrabber版本不兼容,下载对应的版本。
# wget ftp://ftp.icm.edu.pl/vol/rzm3/linux-centos-altarch/7.5.1804/os/armhfp/Packages/python-urlgrabber-3.10-8.el7.noarch.rpm
安装:
# rpm -ivh python-urlgrabber-3.10-8.el7.noarch.rpm
再次安装yum程序
# rpm -ivh yum-3.4.3-161.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
安装成功。
3) repo 配置文件
下载配置文件
# cd /etc/yum.repos.d/#进入到yum配置文件目录
# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo #下载配置文件
设置配置文件
# sed -i "s;\$releasever;7;g" CentOS7-Base-163.repo
替换新的repo文件
# mv redhat.repo redhat.repo.bak
配置文件内容如下:
[base]
name=CentOS-7 - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-7 - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-7 - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
更新yum缓存
# yum clean all#清除yum缓存
# yum makecache #更新yum缓存
执行yumrepolist查看,如果显示出repo仓库列表 , 并显示软件包数量则OK。
# yum repolist
至此yum源更换完成。
更多RedHat相关信息见 RedHat 专题页面 https://www.linuxidc.com/topicnews.aspx?tid=10
Linux公社的RSS地址 : https://www.linuxidc.com/rssFeed.aspx
本文永久更新链接地址: https://www.linuxidc.com/Linux/2018-12/155855.htm
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- 更换blog托管
- 【iOS】动态更换图标
- AndroidStudio更换ConstraintLayout布局
- 【iOS】动态更换App图标
- CentOS 7 更换 yum 源
- ceph节点journal盘更换
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Designing Programmes
Karl Gerstner / Springer Verlag / 2007 / $499.00
Karl Gerstnera (TM)s work is a milestone in the history of design. One of his most important works is Designing Programmes, which is presented here in a new edition of the original 1964 publication. I......一起来看看 《Designing Programmes》 这本书的介绍吧!