标签:security 第三方 bash ops 修改 大学 highlight its iba
使用过Ubuntu的道友们都知道,默认地址是乌班图的org 配置的,对于国内长途跋涉的各位高手来讲真是艰辛;
所以我们一般在安装的时候会先修改服务器源地址使用国内的比如ali,清华或者华为的
源文件地址默认在 /etc/apt/sources.list,当然如果你安装第三方的一般我们喜欢在/etc/apt下建立一个sources.list.d 目录下再在它下面新建一个xxx.list 来存放第三方的安装的deb地址:
比如第三方谷歌浏览器deb的:
如果你嫌弃麻烦直接手动下载一个xxx.deb谁用dpkg -i xxx.deb 进行创建他会帮你创建sources.list.d 以及对应的.list dpkg 默认是没有的apt-get 自己装个
下面来介绍配置aliyun 的·服务器源:
vim /etc/apt/sources.list
删除所有的地址:粘贴如下:地址百度的,可以自己找,也可以用我的当然我也是百度的,谁没事背这玩意:
####阿里源地址 # https://opsx.alibaba.com/mirror deb https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse # 仿照清华镜像源,注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释,这个是源码安装的 # deb-src https://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
# https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
###清华大学源 # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
最后执行热更新就可以了:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
解读Ubuntu的sources.list 和soucres.litsd
标签:security 第三方 bash ops 修改 大学 highlight its iba
原文地址:https://www.cnblogs.com/SunshineKimi/p/12299834.html