Linux系统Red Hat Enterprise Linux 7无法使用yml源的问题

   Red Hat Enterprise Linux 7 64 位,它linux的yml是需要注册才可以使用的,所以我们不能直接使用,被折磨了半天时间终于从网上找到了一个可以使用的去解决这个问题的方法了,记录下来,方便自己以后使用,也为大家提供方便。
  我讲解的是最快速安装的方法,没有多余的步骤,可能不太详细,详细讲解附上
  https://blog.csdn.net/qq_27365043/article/details/76247710

链接:https://pan.baidu.com/s/1uQqA_RXio2BZQLBqQ_yHsQ
提取码:st28

1.首先将上面的链接中的包下载下来,通过工具放到linux系统中某一文件夹下面

2.然后执行[root@pan ~]# rpm -ivh yum-*  就可以进行安装了

3.编辑这个文件vim /etc/yum.repos.d/CentOS-Base.repo,直接将下面的内容粘贴到编辑的位置然后保存即可
#CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[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
4.使用 yum clean all 清除缓存就可以使用啦

Guess you like

Origin blog.csdn.net/PhilsphyPrgram/article/details/112095206