All domestic images in one station

Time:2021-2-25

In the development process, we often use a variety of package management tools. Almost every package management tool is set to download the corresponding software installation package from a foreign server by default, or it is slow to download, or it can’t be downloaded at all. The following is a list of all my commonly used domestic images for reference by students with similar needs(update from time to time, if you feel useful, please pay attention to the collection)

I usually use itshellyesfishSo the following syntax is allfishdependentset -xIf the defaultbash, which can be replaced byexportOrders.

Operating system related

Domestic image of brew

cd /usr/local/Homebrew
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
#Domestic image of brew
set -x HOMEBREW_BOTTLE_DOMAIN https://mirrors.ustc.edu.cn/homebrew-bottles

JavaScript related

NPM domestic image

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

Domestic image of yarn

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

Pnpm domestic image

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

Domestic image of electron

set -x ELECTRON_MIRROR http://npm.taobao.org/mirrors/electron/

Domestic image of node sass

set -x SASS_BINARY_SITE https://npm.taobao.org/mirrors/node-sass/

Fsevents domestic image

set -x FSE_BINARY_HOST_MIRROR https://npm.taobao.org/mirrors/fsevents/

more

More settings, or students who are too lazy to set one by one, can also refer to here:

https://gist.github.com/hetyk…

Download the code to a shell script and add it with one click.

Python related

PIP domestic image

$ cat ~/.pip/pip.conf
[global]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple

Domestic image of CONDA

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes

PHP related

Composer domestic image

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

Other languages

Domestic image of flutter

set -x PUB_HOSTED_URL https://pub.flutter-io.cn
set -x FLUTTER_STORAGE_BASE_URL https://storage.flutter-io.cn

supplement

GitHub domestic image

If it is ingit cloneWhen you encounter problems, you can first create a library in the code cloud, which comes from GitHub, and then synchronize the library.