替换centos 镜像源
#!/usr/bin/env bash if [ ! -f /etc/yum.repos.d/CentOS-Base.repo.bak ]; then cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak fi sed -i '/mirrorlist/d' /etc/yum.repos.d/CentOS-Base.repo sed -i '/releasever\/os/c\baseurl=http:\/\/mirrors.xxx.org\/nexus\/repository\/centos-proxy\/\$releasever\/os\/\$basearch' /etc/yum.repos.d/CentOS-Base.repo sed -i '/releasever\/updates/c\baseurl=http:\/\/mirrors.xxx.org\/nexus\/repository\/centos-proxy\/\$releasever\/updates\/\$basearch' /etc/yum.repos.d/CentOS-Base.repo sed -i '/releasever\/extras/c\baseurl=http:\/\/mirrors.xxx.org\/nexus\/repository\/centos-proxy\/\$releasever\/extras\/\$basearch' /etc/yum.repos.d/CentOS-Base.repo sed -i '/releasever\/centosplus/c\baseurl=http:\/\/mirrors.xxx.org\/nexus\/repository\/centos-proxy\/\$releasever\/centosplus\/\$basearch' /etc/yum.repos.d/CentOS-Base.repo yum makecache
人生还有意义。那一定是还在找存在的理由