ubuntu server18.04 更换默认源为阿里源-加速

摘要:
Ubuntu安装完毕后,默认使用的是官方的源,在国内访问速度很慢,这里介绍更换为阿里云的源方法。

Ubuntu安装完毕后,默认使用的是官方的源,在国内访问速度很慢,这里介绍更换为阿里云的源方法。

安装server时建议替换镜像源,可以提速

原镜像:
http://cn.archive.ubuntu.com/ubuntu/

更换为:
http://mirrors.aliyun.com/ubuntu/
http://mirrors.cn99.com/ubuntu/

步骤如下:

1.备份源配置文件

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

2.用编辑器打开源配置文件

sudo vim /etc/apt/sources.list

3.删除文件内容,更换为以下内容(也可使用其他源)

deb http://mirrors.aliyun.com/ubuntu trusty main restricted
deb-src http://mirrors.aliyun.com/ubuntu trusty main restricted
 
## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.aliyun.com/ubuntu trusty-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu trusty-updates main restricted
 
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu trusty universe
deb-src http://mirrors.aliyun.com/ubuntu trusty universe
deb http://mirrors.aliyun.com/ubuntu trusty-updates universe
deb-src http://mirrors.aliyun.com/ubuntu trusty-updates universe
 
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.aliyun.com/ubuntu trusty multiverse
deb-src http://mirrors.aliyun.com/ubuntu trusty multiverse
deb http://mirrors.aliyun.com/ubuntu trusty-updates multiverse
deb-src http://mirrors.aliyun.com/ubuntu trusty-updates multiverse
 
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu trusty-backports main restricted universe multiverse
 
deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

4.执行以下命令,刷新

sudo apt-get clean
sudo apt-get update

https://www.cnblogs.com/suibber/p/5007661.html

免责声明:文章转载自《ubuntu server18.04 更换默认源为阿里源-加速》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇koa 搭建模块化路由/层级路由html实现弹框,并伴随遮罩层,且弹框居中下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

2013年8月,阿里云飞天5K集群成功上线,所有的服务对应的都是同一个系统内核、同一套分布式文件系统

IDC研究显示,包含结构化和非结构化的大数据正在以每年60%的增长率持续增长,到了2020年全球数据总量将增长44倍,达到35.2ZB。而着眼国内,2013年产生的数据总量已经超过0.8ZB,两倍于2012年,相当于2009年全球的数据总量。预计到2020年,中国产生的数据总量更可能超过8.5ZB。井喷的数据在给各个机构带来数不尽机遇和财富的同时,也在存储...

调用互联网API接口(腾讯、阿里)等出现"未知名称或服务(Name or service not known)"

一、问题 开发反馈程序调用api.mch.weixin.qq.com时,时不时出现"[Errno -2] Name or service not known"错误。 二、排查 1、DNS地址配置为114.114.114.114,偶发出现解析慢的现象 2、可能原因 CentOS 6/7的DNS解析器在解析地址时会同时发出解析ipv4和ipv6的请求,且使用同...

阿里云人脸比对API封装

这是根据封装是根据阿里云官方给的Demo进行修改的,当时是因为编写微信小程序云函数需要使用到阿里云人脸比对接口,才对其进行封装的。 记录下来,方便下次使用。 复制下来可以直接使用。 用到的依赖如下,使用npm安装: request url crypto 1 /** 2 * 文件说明:阿里云人脸比对API封装 3 */ 4 5 var request...

手把手教你用Jenkins CI 自动部署Docker + 使用阿里云镜像服务自动构建+ webhook触发

Jenkins部分 首先,我们要有个Jenkins咯,下载链接:https://jenkins.io/download/ 我们安装官网教程安装好jenkins,安装教程略.... 嗯?不是说好手把手么?你妹的. 好好好,我们还是来手把手教程好了. 首先安装JDK8 添加安装源之后直接apt-get install就好,下面是ubuntu的安装命令,其他系统...

APP漏洞自动化扫描专业评测报告(下篇)

上篇、中篇回顾:通过收费情况、样本测试后的扫描时间、漏洞项对比以及扫描能力这几个方面对阿里聚安全[1]、360App漏洞扫描[2]、腾讯金刚审计系统[3]、百度移动云测试中心[4]以及AppRisk Scanner[5]进行了对比分析。作为本系列的最后一篇,我将会以4个随机选取的APP的测试结果来进行对比。 四、扫描结果对比 选取的APP:说明一下这次选择...

阿里的druid 监控

Druid首先是一个数据库连接池,但它不仅仅是一个数据库连接池,它还包含一个ProxyDriver,一系列内置的JDBC组件库,一个SQL Parser。 Druid支持所有JDBC兼容的数据库,包括Oracle、MySql、Derby、Postgresql、SQL Server、H2等等。  Druid针对Oracle和MySql做了特别优化,比如Ora...