价值5000
有时候临时用个国内鸡,又不想麻烦配置国内源
比如pip的时候
就可以直接pip install -i 源
而我,用自己的域名,301到国内源,清华阿里腾讯之类的,那么我就可以用我自己的域名了,就像这样
npm估计也是一样的
方便自己记忆,多好啊
下面提供一下国内源,腾讯云的很好记,但是更新好像稍微慢了点
pip清华源-i https://pypi.tuna.tsinghua.edu.cn/simple npm有淘宝源–registry=https://registry.npm.taobao.org
还有些别的,也可以自己301一下,方便记忆 http://mirrors.cloud.tencent.com/repo/ubuntu16_sources.list http://mirrors.cloud.tencent.com/repo/ubuntu18_sources.list http://mirrors.cloud.tencent.com/repo/ubuntu20_sources.list
http://mirrors.cloud.tencent.com/repo/centos6_base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo http://mirrors.cloud.tencent.com/repo/centos8_base.repo
http://mirrors.cloud.tencent.com/repo/debian9_sources.list http://mirrors.cloud.tencent.com/repo/debian10_sources.list http://mirrors.cloud.tencent.com/repo/debian11_sources.list #这个还没有,以后腾讯云应该会加上的
还有别的MJJ自己查一下吧
我的目前就这些
https://haoduck.com/cn/pypi https://haoduck.com/cn/npm
https://haoduck.com/cn/ubuntu20 https://haoduck.com/cn/ubuntu18 https://haoduck.com/cn/ubuntu16 https://haoduck.com/cn/debian11 #暂时没有 https://haoduck.com/cn/debian10 https://haoduck.com/cn/debian9 https://haoduck.com/cn/centos8 https://haoduck.com/cn/centos7 https://haoduck.com/cn/centos6
用法就像下面这样
- wget -O /etc/apt/sources.list https://haoduck.com/cn/ubuntu20
- apt-get clean all
- apt-get update
复制代码
- wget -O /etc/apt/sources.list https://haoduck.com/cn/debian10
- apt-get clean all
- apt-get update
复制代码
- wget -O /etc/yum.repos.d/CentOS-Base.repo https://haoduck.com/cn/centos7
- yum clean all
- yum makecache
复制代码
送一份Nginx的配置,别的自己加喔
- rewrite ^/cn/ubuntu(.*) http://mirrors.cloud.tencent.com/repo/ubuntu$1_sources.list permanent;
- rewrite ^/cn/debian(.*) http://mirrors.cloud.tencent.com/repo/debian$1_sources.list permanent;
- rewrite ^/cn/centos(.*) http://mirrors.cloud.tencent.com/repo/centos$1_base.repo.list permanent;
复制代码
|