1 mins

Debianh2
通用h3
cp -a /etc/apt/sources.list /etc/apt/sources.list.bak
sed -i "s@http://ftp.debian.org@https://repo.huaweicloud.com@g" /etc/apt/sources.listsed -i "s@http://security.debian.org@https://repo.huaweicloud.com@g" /etc/apt/sources.list
sed -i 's/deb.debian.org/repo.huaweicloud.com/g' /etc/apt/sources.list.d/debian.sources
Ubuntuh2
Ubuntu 20-22h3
cp -a /etc/apt/sources.list /etc/apt/sources.list.back
sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.listsed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
Ubuntu 24h3
cp -a /etc/apt/sources.list /etc/apt/sources.list.bakcp -a /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.baksed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list.d/ubuntu.sourcessed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list.d/ubuntu.sources
cat > /etc/apt/sources.list.d/ubuntu.sources <<EOFTypes: debURIs: http://repo.huaweicloud.com/ubuntu/Suites: noble noble-updates noble-backportsComponents: main universe restricted multiverseSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
## Ubuntu security updates. Aside from URIs and Suites,## this should mirror your choices in the previous section.Types: debURIs: http://repo.huaweicloud.com/ubuntu/Suites: noble-securityComponents: main universe restricted multiverseSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpgEOF
NPMh2
https://npmmirror.com
npm config set registry https://registry.npmmirror.com
npm config set registry https://repo.huaweicloud.com/repository/npm/
PIPh2
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set global.index-url https://repo.huaweicloud.com/repository/pypi/simple
Goh2
export GO111MODULE=onexport GOPROXY=https://repo.huaweicloud.com/repository/goproxy/export GONOSUMDB=*