国内机子如N1刚刷新系统,apt-get update很慢,源可能在国外,所以更换国内源速度才能变快。手动更换源很简单,但是一键换源更方便,能省点事就省点吧。

脚本适合 :

CentOS 5、6、7

Ubuntu 14.04、16.04、18.04

Debian 7、8、9

1
1

使用方法:

 wget git.io/superupdate.sh
 bash superupdate.sh

也可使用一键换源

wget -qO- git.io/superupdate.sh | bash

如果第一步你出现错误或执行后无任何输出,请检查是否安装 wgetca-certificates,请使用

apt-get install -y wget && apt-get install -y ca-certificates

或者

yum install -y wget && yum install -y ca-certificates

对于 Debian 默认换源为 Fastly CDNmirror 这个源有 Fastly 的加持对境外主机都有不错的速度。 对于 UbuntuCentOS 系统都默认换为阿里云的 mirror 这个源有阿里云全球 CDN 的加持,全球都有不错的速度。

更换指定源:

对于 Debian 系统还设置了四套其他的源,阿里云CloudFront CDN网易163中科大的源,请根据需要使用参数一键设置如

中科大

bash superupdate.sh cn

网易163

bash superupdate.sh 163

阿里云

bash superupdate.sh aliyun

亚马逊CloudFront

bash superupdate.sh aws

如果配置的文件不满意,一键还原

bash superupdate.sh restore

项目地址 https://git.io/superupdate.sh

文章转自:https://www.oldking.net/697.html