搜索
 找回密码
 立即注册

CentOS更换yum源 202409015

abcys 4 天前 13
wget安装失败!CentOS更换yum源。

1、连接 “Linux系统” 服务器


连接 “CentOS系统” 服务器教程:点击查看

2、文件


找到:/etc/yum.repos.d/CentOS-Base.repo

3、替换


把 “CentOS-Base.repo” 文件里所有内容全部替换。

  1. # CentOS-Base.repo
  2. #
  3. # The mirror system uses the connecting IP address of the client and the
  4. # update status of each mirror to pick mirrors that are updated to and
  5. # geographically close to the client.  You should use this for CentOS updates
  6. # unless you are manually picking other mirrors.
  7. #
  8. # If the #mirrorlist= does not work for you, as a fall back you can try the
  9. # remarked out baseurl= line instead.
  10. #
  11. #

  12. [base]
  13. name=CentOS-$releasever - Base
  14. #mirrorlist=http://#mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
  15. baseurl=http://vault.epel.cloud/centos/$releasever/os/$basearch/
  16. gpgcheck=1
  17. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

  18. #released updates
  19. [updates]
  20. name=CentOS-$releasever - Updates
  21. #mirrorlist=http://#mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
  22. baseurl=http://vault.epel.cloud/centos/$releasever/updates/$basearch/
  23. gpgcheck=1
  24. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

  25. #additional packages that may be useful
  26. [extras]
  27. name=CentOS-$releasever - Extras
  28. #mirrorlist=http://#mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
  29. baseurl=http://vault.epel.cloud/centos/$releasever/extras/$basearch/
  30. gpgcheck=1
  31. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

  32. #additional packages that extend functionality of existing packages
  33. [centosplus]
  34. name=CentOS-$releasever - Plus
  35. #mirrorlist=http://#mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
  36. baseurl=http://vault.epel.cloud/centos/$releasever/centosplus/$basearch/
  37. gpgcheck=1
  38. enabled=0
  39. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
复制代码
随机推荐

0 回复

高级模式
游客