* 原始文章地址可能暂时无法访问,仅展示文章的摘要信息
「centos6/7/8把yum源更换为阿里源」的摘要信息
由于CentOS官方已全面停止维护CentOS Linux项目,公告指出 CentOS 7和8在2024年6月30日停止技术服务支持,详情见CentOS官方公告。导致CentOS系统源已全面失效,比如安装宝塔等等会出现网络不可达等报错,解决方案是更换系统源。 手动更换 1.移动剪切备份下旧的yun源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载新的CentOS-Base.repo到/etc/yum.repos.d 根据您系统的版本选择下载 Centos6: wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo Centos7: wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo Centos8: wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo 3.清理缓存 yum clean all && yum makecache yum update -y 脚本一键更换 bash <(curl -sSL https://linuxmirrors.cn/main.sh)