A collection of domestic download mirror images of various foreign software

Github

The method of modifying the host that was rumored on the Internet before seems to be of no use. Here are a few ways to tell download and clone

  1. Chrome plugin: Github acceleration and Gitzip from github
  2. Oil Monkey Plugin: github enhancement-high-speed download

pip

The most direct way is to add the address of the Tsinghua mirror image after pip install xxx

-i https://pypi.tuna.tsinghua.edu.cn/simple some-package

E.g:

$ pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

Or modify the configuration

  1. Find the following file ~/.pip/pip.conf If not, just create it

    Add or modify in the above file:

	[global]
	index-url = https://mirrors.aliyun.com/pypi/simple/
	
	[install]
	trusted-host=mirrors.aliyun.com
  1. Or use the command directly
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

conda

Add Tsinghua's mirror

$ vim ~/.condarc
channels:
  - defaults
show_channel_urls: true
channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

$ conda clean -i

perl

Command line operation

$ cpan
> o conf urllist ftp://mirrors.sohu.com/CPAN/ http://mirrors.163.com/cpan/
> o conf urllist push https://mirrors.aliyun.com/CPAN/
> o conf commit

You can also open Myconfig.pm to add and modify directly

above sea level

temporary use

npm --registry https://registry.npm.taobao.org install express

Configure into the environment

npm config set registry https://registry.npm.taobao.org

You can also use Taobao's exclusive command cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

Or you can directly add a new command by adding the npm parameter alias:

alias cnpm="npm --registry=https://registry.npm.taobao.org \
--cache=$HOME/.npm/.cache/cnpm \
--disturl=https://npm.taobao.org/dist \
--userconfig=$HOME/.cnpmrc"

# Or alias it in .bashrc or .zshrc
$ echo '\n#alias for cnpm\nalias cnpm="npm --registry=https://registry.npm.taobao.org \
  --cache=$HOME/.npm/.cache/cnpm \
  --disturl=https://npm.taobao.org/dist \
  --userconfig=$HOME/.cnpmrc"' >> ~/.zshrc && source ~/.zshrc

For detailed methods, please refer to https://developer.aliyun.com/mirror/NPM

maven

Modify the setting.xml file in the conf folder under the Maven root directory, or ~/.m2/setting.xml, the code is as follows:

<mirrors>
    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>        
    </mirror>
</mirrors>

Docker

It is strongly recommended to use Alibaba Cloud's docker image acceleration, the method of use is also very simple

Log in to the official website of Alibaba Cloud and copy the website he provided in Mirror Tools> Mirror Accelerator

Run the following command

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
    
    
  "registry-mirrors": ["https://jqw1kzri.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

Other acceleration methods can refer to this website

Guess you like

Origin blog.csdn.net/qq_32115939/article/details/109112069