Linux配置常用源

CentOS

yum install -y wget

更改配置文件(很重要)

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

CentOS 5

#腾讯云
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos5_base.repo

CentOS 6

#阿里云
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-6.repo

#腾讯云
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos6_base.repo

CentOS 7

#阿里云
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

#腾讯云
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo

CentOS 8

#阿里云
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo

#腾讯云
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos8_base.repo

更新缓存

yum clean all && yum makecache

Debian

Debian源的使用需要以root权限修改/etc/apt/sources.list配置文件,修改之前,请做好备份

debian7.x(wheezy)

#阿里云
deb http://mirrors.aliyun.com/debian/ wheezy main non-free contrib
deb http://mirrors.aliyun.com/debian/ wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ wheezy main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ wheezy-proposed-updates main non-free contrib

#腾讯云
deb http://mirrors.cloud.tencent.com/debian wheezy main contrib non-free
deb http://mirrors.cloud.tencent.com/debian wheezy-updates main contrib non-free
#deb http://mirrors.cloud.tencent.com/debian wheezy-proposed-updates main contrib non-free
#deb http://mirrors.cloud.tencent.com/debian wheezy-backports main contrib non-free
#deb http://mirrors.cloud.tencent.com/debian wheezy-backports-sloppy main contrib non-free
deb-src http://mirrors.cloud.tencent.com/debian wheezy main contrib non-free
deb-src http://mirrors.cloud.tencent.com/debian wheezy-updates main contrib non-free
#deb-src http://mirrors.cloud.tencent.com/debian wheezy-proposed-updates main contrib non-free
#deb-src http://mirrors.cloud.tencent.com/debian wheezy-backports main contrib non-free
#deb-src http://mirrors.cloud.tencent.com/debian wheezy-backports-sloppy main contrib non-free

debian 8.x (jessie)

#阿里云
deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib
deb http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ jessie main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib

#腾讯云
deb http://mirrors.cloud.tencent.com/debian jessie main contrib non-free
deb http://mirrors.cloud.tencent.com/debian jessie-updates main contrib non-free
#deb http://mirrors.cloud.tencent.com/debian jessie-backports main contrib non-free
#deb http://mirrors.cloud.tencent.com/debian jessie-proposed-updates main contrib non-free
deb-src http://mirrors.cloud.tencent.com/debian jessie main contrib non-free
deb-src http://mirrors.cloud.tencent.com/debian jessie-updates main contrib non-free
#deb-src http://mirrors.cloud.tencent.com/debian jessie-backports main contrib non-free
#deb-src http://mirrors.cloud.tencent.com/debian jessie-proposed-updates main contrib non-free

debian9.x(stretch)

#阿里云
deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib

#腾讯云
deb http://mirrors.cloud.tencent.com/debian stretch main contrib non-free
deb http://mirrors.cloud.tencent.com/debian stretch-updates main contrib non-free
#deb http://mirrors.cloud.tencent.com/debian stretch-backports main contrib non-free
#deb http://mirrors.cloud.tencent.com/debian stretch-proposed-updates main contrib non-free
deb-src http://mirrors.cloud.tencent.com/debian stretch main contrib non-free
deb-src http://mirrors.cloud.tencent.com/debian stretch-updates main contrib non-free
#deb-src http://mirrors.cloud.tencent.com/debian stretch-backports main contrib non-free
#deb-src http://mirrors.cloud.tencent.com/debian stretch-proposed-updates main contrib non-free

debian10.x(buster)

#腾讯云
deb https://mirrors.cloud.tencent.com/debian/ buster main contrib non-free
deb https://mirrors.cloud.tencent.com/debian/ buster-updates main contrib non-free
deb https://mirrors.cloud.tencent.com/debian/ buster-backports main contrib non-free
deb https://mirrors.cloud.tencent.com/debian-security buster/updates main contrib non-free
deb-src https://mirrors.cloud.tencent.com/debian/ buster main contrib non-free
deb-src https://mirrors.cloud.tencent.com/debian/ buster-updates main contrib non-free
deb-src https://mirrors.cloud.tencent.com/debian/ buster-backports main contrib non-free
deb-src https://mirrors.cloud.tencent.com/debian-security buster/updates main contrib non-free

更新缓存

apt-get clean all && apt-get update

Ubuntu

Ubuntu源的使用需要以root权限修改/etc/apt/sources.list配置文件,修改之前,请做好备份,本文以Ubuntu14.04和Ubuntu16.04为例,介绍使用方式

Ubuntu 14.04

#阿里云
deb https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

## Not recommended
# deb https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

#腾讯云
deb http://mirrors.cloud.tencent.com/ubuntu trusty main restricted universe multiverse
deb http://mirrors.cloud.tencent.com/ubuntu trusty-updates main restricted universe multiverse
deb http://mirrors.cloud.tencent.com/ubuntu trusty-security main restricted universe multiverse
#deb http://mirrors.cloud.tencent.com/ubuntu trusty-backports main restricted universe multiverse
#deb http://mirrors.cloud.tencent.com/ubuntu trusty-proposed main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu trusty main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu trusty-updates main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu trusty-security main restricted universe multiverse
#deb-src http://mirrors.cloud.tencent.com/ubuntu trusty-backports main restricted universe multiverse
#deb-src http://mirrors.cloud.tencent.com/ubuntu trusty-proposed main restricted universe multiverse

Ubuntu 16.04

#阿里云
deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main

deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

#腾讯云
deb http://mirrors.cloud.tencent.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.cloud.tencent.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.cloud.tencent.com/ubuntu/ xenial-updates main restricted universe multiverse
#deb http://mirrors.cloud.tencent.com/ubuntu/ xenial-proposed main restricted universe multiverse
#deb http://mirrors.cloud.tencent.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ xenial-updates main restricted universe multiverse
#deb-src http://mirrors.cloud.tencent.com/ubuntu/ xenial-proposed main restricted universe multiverse
#deb-src http://mirrors.cloud.tencent.com/ubuntu/ xenial-backports main restricted universe multiverse

Ubuntu 18.04(bionic)

#阿里云
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

Ubuntu 20.04(focal)

#阿里云
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

也可以通过wget获取配置文件

#腾讯云
# 14.04
wget -O /etc/apt/sources.list  http://mirrors.cloud.tencent.com/repo/ubuntu14_sources.list
# 16.04
wget -O /etc/apt/sources.list http://mirrors.cloud.tencent.com/repo/ubuntu16_sources.list

更新缓存

apt-get clean all
apt-get update
提示: 若您使用腾讯云服务器,请将源的域名从 mirrors.cloud.tencent.com 改为 mirrors.tencentyun.com,使用内网流量不占用公网流量。

给TA买糖
共{{data.count}}人
人已赞赏
Linux

世纪互联版onedrive的rclone配置

2020-11-17 21:51:15

Linux

Debian/Ubuntu实现RSS订阅自动下载-安装flexget及配置

2021-2-4 14:48:54

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索