当前位置:   article > 正文

CentOS 7 停止维护(2024-6-30)后可用在线yum源 —— 筑梦之路_centos停止维护

centos停止维护

众所周知,centos 7 在2024年6月30日,生命周期结束,官方不再进行支持维护,而很多环境一时之间无法完全更新替换操作系统,因此对于yum源还是需要的,特别是对于互联网环境来说,在线yum源使用方便很多,而不需要去搭建本地yum源和内网yum源。

这里以阿里云为例,其他国内开源镜像站类似。

1. 备份默认的repo文件

  1. cd /etc/yum.repos.d
  2. mkdir backup
  3. mv *.repo backup

2.配置阿里云的yum源

  1. cat > CentOS-aliyun-lhr.repo <<EOF
  2. [base]
  3. name=CentOS-7.9.2009
  4. enabled=1
  5. failovermethod=priority
  6. baseurl=http://mirrors.aliyun.com/centos-vault/7.9.2009/os/$basearch/
  7. gpgcheck=1
  8. gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-7
  9. [updates]
  10. name=CentOS-7.9.2009
  11. enabled=1
  12. failovermethod=priority
  13. baseurl=http://mirrors.aliyun.com/centos-vault/7.9.2009/updates/$basearch/
  14. gpgcheck=1
  15. gpgkey=http://mirrors.aliyun.comm/centos-vault/RPM-GPG-KEY-CentOS-7
  16. [extras]
  17. name=CentOS-7.9.2009
  18. enabled=1
  19. failovermethod=priority
  20. baseurl=http://mirrors.aliyun.com/centos-vault/7.9.2009/extras/$basearch/
  21. gpgcheck=1
  22. gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-7
  23. [epel]
  24. name=Extra Packages for Enterprise Linux 6 - $basearch
  25. enabled=1
  26. failovermethod=priority
  27. baseurl=http://mirrors.aliyun.com/epel-archive/6/$basearch
  28. gpgcheck=0
  29. gpgkey=http://mirrors.aliyun.com/epel-archive/RPM-GPG-KEY-EPEL-7
  30. EOF

 3. 检查验证

  1. yum clean all
  2. yum makecache fast
  3. yum install vim lrzsz wget curl net-tools

4. 其他可用yum源搜集

1)官方yum源

  1. cat > CentOS-Base.repo <<EOF
  2. [base]
  3. name=CentOS-7.9.2009
  4. enabled=1
  5. failovermethod=priority
  6. baseurl=https://vault.centos.org/7.9.2009/os/$basearch/
  7. gpgcheck=1
  8. gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-7
  9. [updates]
  10. name=CentOS-7.9.2009
  11. enabled=1
  12. failovermethod=priority
  13. baseurl=https://vault.centos.org/7.9.2009/updates/$basearch/
  14. gpgcheck=1
  15. gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-7
  16. [extras]
  17. name=CentOS-7.9.2009
  18. enabled=1
  19. failovermethod=priority
  20. baseurl=https://vault.centos.org/7.9.2009/extras/$basearch/
  21. gpgcheck=1
  22. gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-7
  23. [epel]
  24. name=Extra Packages for Enterprise Linux 7 - $basearch
  25. enabled=1
  26. failovermethod=priority
  27. baseurl=https://vault.centos.org/epel-archive/7/$basearch
  28. gpgcheck=0
  29. gpgkey=https://vault.centos.org/epel-archive/RPM-GPG-KEY-EPEL-7
  30. EOF

2) 清华大学yum源

  1. cat > CentOS-tsinghua.repo <<EOF
  2. [base]
  3. name=CentOS-7.9.2009
  4. enabled=1
  5. failovermethod=priority
  6. baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.9.2009/os/$basearch/
  7. gpgcheck=1
  8. gpgkey=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/RPM-GPG-KEY-CentOS-7
  9. [updates]
  10. name=CentOS-7.9.2009
  11. enabled=1
  12. failovermethod=priority
  13. baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.9.2009/updates/$basearch/
  14. gpgcheck=1
  15. gpgkey=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/RPM-GPG-KEY-CentOS-7
  16. [extras]
  17. name=CentOS-7.9.2009
  18. enabled=1
  19. failovermethod=priority
  20. baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.9.2009/extras/$basearch/
  21. gpgcheck=1
  22. gpgkey=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/RPM-GPG-KEY-CentOS-7
  23. [epel]
  24. name=Extra Packages for Enterprise Linux 7 - $basearch
  25. enabled=1
  26. failovermethod=priority
  27. baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel-archive/7/$basearch
  28. gpgcheck=0
  29. gpgkey=https://mirrors.tuna.tsinghua.edu.cn/epel-archive/RPM-GPG-KEY-EPEL-7
  30. EOF

3)中科大yum源

  1. cat > CentOS-ustc.repo <<EOF
  2. # CentOS-Base.repo
  3. #
  4. # The mirror system uses the connecting IP address of the client and the
  5. # update status of each mirror to pick mirrors that are updated to and
  6. # geographically close to the client. You should use this for CentOS updates
  7. # unless you are manually picking other mirrors.
  8. #
  9. # If the mirrorlist= does not work for you, as a fall back you can try the
  10. # remarked out baseurl= line instead.
  11. #
  12. #
  13. [base]
  14. name=CentOS-$releasever - Base
  15. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
  16. baseurl=https://mirrors.ustc.edu.cn/centos-vault/centos/$releasever/os/$basearch/
  17. gpgcheck=1
  18. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  19. #released updates
  20. [updates]
  21. name=CentOS-$releasever - Updates
  22. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
  23. baseurl=https://mirrors.ustc.edu.cn/centos-vault/centos/$releasever/updates/$basearch/
  24. gpgcheck=1
  25. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  26. #additional packages that may be useful
  27. [extras]
  28. name=CentOS-$releasever - Extras
  29. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
  30. baseurl=https://mirrors.ustc.edu.cn/centos-vault/centos/$releasever/extras/$basearch/
  31. gpgcheck=1
  32. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  33. #additional packages that extend functionality of existing packages
  34. [centosplus]
  35. name=CentOS-$releasever - Plus
  36. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
  37. baseurl=https://mirrors.ustc.edu.cn/centos-vault/centos/$releasever/centosplus/$basearch/
  38. gpgcheck=1
  39. enabled=0
  40. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  41. EOF

其他centos版本的yum源配置:

CentOS 6 在线可用yum源配置——筑梦之路_centos6可用yum源-CSDN博客

CentOS 8 停止维护后换可用yum源——筑梦之路_centos yum 阿里云镜像还支持吗-CSDN博客

参考资料:

https://www.cnblogs.com/yeziwinone/p/17916626.html 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/790645
推荐阅读
相关标签
  

闽ICP备14008679号