Redhat 7.5 更新 yum 源;

Redhat 7.5 更新 yum 源;

一、系统版本 :

[root@localhost yum.repos.d]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.5 (Maipo)

[root@localhost yum.repos.d]# cat /proc/version
Linux version 3.10.0-862.el7.x86_64 (mockbuild@x86-034.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) ) #1 SMP Wed Mar 21 18:14:51 EDT 2018

二、Redhat自带源是需要注册的;

查看 安装的 yum 版本;

# rpm -qa |grep yum 

三、检查 yum 包;

Redhat 默认都有 yum 安装,如不小心卸载:

1、下载地址:

yum-3.4.3-167.el7.centos.noarch.rpm  (默认的 搜索是带centos 的 rpm 包)
yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
yum-rhn-plugin-2.0.1-10.el7.noarch.rpm

如 163 地址下载;
http://mirrors.163.com/centos/7/os/x86_64/Packages/
目录下载;
http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-167.el7.centos.noarch.rpm
http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-rhn-plugin-2.0.1-10.el7.noarch.rpm

2、直接rpm 安装 yum 包

# rpm -ivh --force --nodeps yum-*
问题?
Header V3 RSA/SHA256 Signature, keykey ID ?
# 如果提示 yum-3.4.3-167.el7.centos.noarch.rpm ID验证问题?可以 --force --nodeps 跳过;

四、更新 163 源;

1、配置 163 源;

# vi /etc/yum.repo.d/163.repo

[163.repo] 
name=mirrors.163.com.repo 
baseurl=http://mirrors.163.com/centos/7/os/x86_64/ 
enabled=1 
gpgcheck=1 
gpgkey=http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

2、更新源缓存;

# yum clean all

或者直接删除 # rm
-rf /var/cache/yum

五、163 源测试:

# yum install gcc -y

六、yum 测试:

yum 安装 salt 测试
# yum install salt-minion -y
需要选择对应的Redhat版本和Python版本
https://repo.saltstack.com/#rhel
1、Python2.7 环境 (Redhat7.5 默认自带的是 Python 2.7.5 版本)
REDHAT
/ CENTOS 7 PY2 # yum install https://repo.saltstack.com/yum/redhat/salt-repo-latest.el7.noarch.rpm 2、如果是Python3 环境;
REDHAT
/ CENTOS 7 PY3 # yum install https://repo.saltstack.com/py3/redhat/salt-py3-repo-latest.el7.noarch.rpm

 

posted @ 2020-05-06 20:14  01234567  阅读(1736)  评论(0编辑  收藏  举报