VMware16pro虚拟机,RedHat7.9 更换yum源

问题:

安装VMware16pro虚拟机和RedHat7.9后,通过yum安装vsftpd时,报错如下:

VMware16pro虚拟机,RedHat7.9 更换yum源_第1张图片

原因分析:RHEL是收费的,需要注册才可正常使用。解决办法是用CentOS的yum源替换掉原yum源,CentOS已经被红帽收购,且跟RHEL系统没多大区别,可以免费使用。

问题解决步骤:

1.查看Redhat的原yum源,并进行卸载。

VMware16pro虚拟机,RedHat7.9 更换yum源_第2张图片

卸载yum源:

 2. 确定系统可以上网。

VMware16pro虚拟机,RedHat7.9 更换yum源_第3张图片

3.确保http://mirrors.163.com/centos/可以访问,找到自己所需版本进行下载。

http://mirrors.163.com/centos/7/os/x86_64/Packages/python-chardet-2.2.1-3.el7.noarch.rpm

http://mirrors.163.com/centos/7/os/x86_64/Packages/python-kitchen-1.1.1-5.el7.noarch.rpm

http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-168.el7.centos.noarch.rpm

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-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm

http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-54.el7_8.noarch.rpm

http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-54.el7_8.noarch.rpm

 4.安装软件包

 

5. 新建repo配置文件,如果是其他Relhat版本,将7改为对应的版本数字。

VMware16pro虚拟机,RedHat7.9 更换yum源_第4张图片

#CentOS-Base.repo
[base]
name=CentOS-$7 - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&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=$7&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=$7&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

 6.清除缓存

7. 验证yum是否ok。

VMware16pro虚拟机,RedHat7.9 更换yum源_第5张图片

8. 验证ok,yum源更换成功,vsftpd安装成功。 

参考自原链接:https://www.cnblogs.com/zzvb/p/12611510.html

你可能感兴趣的:(Linux,linux)