Skip to content

Commit

Permalink
refactor: sort by name
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkcup authored Sep 25, 2024
1 parent 2a3f210 commit 226d5e7
Showing 1 changed file with 94 additions and 94 deletions.
188 changes: 94 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,74 +25,15 @@ find /etc/apt/ -name "*.list" -print0 | xargs -0 sed -i 's/[a-z]\+.debian.org/mi
find /etc/apt/ -name "*.list" -print0 | xargs -0 sed -i 's/[a-z]\+.debian.org/mirrors.cloud.tencent.com/g'
```

## get docker

```shell
# https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-convenience-script

curl -fsSL https://get.docker.com | sh -s -- --mirror Aliyun

sudo usermod -aG docker $USER
```

## docker hub

```shell
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": [
"https://hub-mirror.c.163.com"
]
}
EOF
sudo service docker restart
docker info
```

## docker Azure

> *.azk8s.cn 不再对外提供服务,仅限于 Azure China IP 使用。参考:[Azure/container-service-for-azure-china#60](https://github.com/Azure/container-service-for-azure-china/issues/60)
```shell
# docker pull mcr.microsoft.com/dotnet/core/runtime:3.1
# docker pull mcr.azk8s.cn/dotnet/core/runtime:3.1

# docker pull gcr.io/google_containers/hyperkube-amd64:v1.9.2
# docker pull gcr.azk8s.cn/google_containers/hyperkube-amd64:v1.9.2
```

## get kubectl

```shell
# https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-linux

wget -nc "https://coding-public-generic.pkg.coding.net/public/downloads/kubectl-linux-amd64?version=v1.22.4" -O kubectl-linux-amd64-v1.22.4 | true
chmod +x ./kubectl-linux-amd64-v1.22.4
sudo mv ./kubectl-linux-amd64-v1.22.4 /usr/local/bin/kubectl
kubectl version
```

## get helm

```shell
# https://github.com/helm/helm/releases

wget -nc "https://coding-public-generic.pkg.coding.net/public/downloads/helm-linux-amd64.tar.gz?version=v3.7.1" -O helm-linux-amd64-v3.7.1.tar.gz | true
tar -zxvf helm-v3.4.2-linux-amd64.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/
helm version
```

## get composer
## composer download

```shell
curl https://mirrors.cloud.tencent.com/composer/composer.phar -o /usr/local/bin/composer
curl https://mirrors.aliyun.com/composer/composer.phar -o /usr/local/bin/composer
chmod +x /usr/local/bin/composer
```

## composer
## composer mirror

```shell
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
Expand All @@ -111,47 +52,41 @@ jq '."packages"[]'"$url_suffix" composer.lock \
mv composer.lock.tmp composer.lock
```

## get nodejs npm
## docker download

```shell
wget -nc "https://coding-public-generic.pkg.coding.net/public/downloads/node-linux-x64.tar.xz?version=v16.13.0" -O node-v16.13.0-linux-x64.tar.xz | true
tar -xf node-v16.13.0-linux-x64.tar.xz -C /usr --strip-components 1
node -v
```

## npm
# https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-convenience-script

注意:`npm install` 不使用 `package-lock.json` 中的完整下载链接(resolved 字段),而是使用 config registry。
curl -fsSL https://get.docker.com | sh -s -- --mirror Aliyun

```shell
# 淘宝
npm config set registry https://registry.npmmirror.com
npm config set disturl https://npmmirror.com/dist
npm config set electron_mirror https://npmmirror.com/mirrors/electron/
npm config set sass_binary_site https://npmmirror.com/mirrors/node-sass/
npm config set phantomjs_cdnurl https://npmmirror.com/mirrors/phantomjs/
npm config set puppeteer_download_host https://npmmirror.com/mirrors
npm config set chromedriver_cdnurl http://npmmirror.com/mirrors/chromedriver
sudo usermod -aG docker $USER
```

# 腾讯云
npm config set registry https://mirrors.cloud.tencent.com/npm/
npm config set sass_binary_site https://mirrors.cloud.tencent.com/npm/node-sass
npm config set chromedriver_cdnurl https://mirrors.cloud.tencent.com/npm/chromedriver
## docker hub

# 恢复默认
npm config delete registry
```shell
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": [
"https://hub-mirror.c.163.com"
]
}
EOF
sudo service docker restart
docker info
```

## pip
## docker Azure

> *.azk8s.cn 不再对外提供服务,仅限于 Azure China IP 使用。参考:[Azure/container-service-for-azure-china#60](https://github.com/Azure/container-service-for-azure-china/issues/60)
```shell
mkdir ~/.pip
cat > ~/.pip/pip.conf << \EOF
[global]
index-url=https://pypi.doubanio.com/simple/
#index-url=https://mirrors.aliyun.com/pypi/simple/
#index-url=https://mirrors.cloud.tencent.com/pypi/simple/
EOF
# docker pull mcr.microsoft.com/dotnet/core/runtime:3.1
# docker pull mcr.azk8s.cn/dotnet/core/runtime:3.1

# docker pull gcr.io/google_containers/hyperkube-amd64:v1.9.2
# docker pull gcr.azk8s.cn/google_containers/hyperkube-amd64:v1.9.2
```

## go
Expand Down Expand Up @@ -227,6 +162,28 @@ allprojects {
EOF
```

## helm download

```shell
# https://github.com/helm/helm/releases

wget -nc "https://coding-public-generic.pkg.coding.net/public/downloads/helm-linux-amd64.tar.gz?version=v3.7.1" -O helm-linux-amd64-v3.7.1.tar.gz | true
tar -zxvf helm-v3.4.2-linux-amd64.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/
helm version
```

## kubectl download

```shell
# https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-linux

wget -nc "https://coding-public-generic.pkg.coding.net/public/downloads/kubectl-linux-amd64?version=v1.22.4" -O kubectl-linux-amd64-v1.22.4 | true
chmod +x ./kubectl-linux-amd64-v1.22.4
sudo mv ./kubectl-linux-amd64-v1.22.4 /usr/local/bin/kubectl
kubectl version
```

## maven

```shell
Expand Down Expand Up @@ -265,15 +222,58 @@ mvn package -s settings.xml
sed -i 's/repo.maven.apache.org\/maven2/mirrors.cloud.tencent.com\/nexus\/repository\/maven-public/g' ./.mvn/wrapper/maven-wrapper.properties
```

## gem
## nodejs npm download

```shell
wget -nc "https://coding-public-generic.pkg.coding.net/public/downloads/node-linux-x64.tar.xz?version=v16.13.0" -O node-v16.13.0-linux-x64.tar.xz | true
tar -xf node-v16.13.0-linux-x64.tar.xz -C /usr --strip-components 1
node -v
```

## npm

注意:`npm install` 不使用 `package-lock.json` 中的完整下载链接(resolved 字段),而是使用 config registry。

```shell
# 淘宝
npm config set registry https://registry.npmmirror.com
npm config set disturl https://npmmirror.com/dist
npm config set electron_mirror https://npmmirror.com/mirrors/electron/
npm config set sass_binary_site https://npmmirror.com/mirrors/node-sass/
npm config set phantomjs_cdnurl https://npmmirror.com/mirrors/phantomjs/
npm config set puppeteer_download_host https://npmmirror.com/mirrors
npm config set chromedriver_cdnurl http://npmmirror.com/mirrors/chromedriver

# 腾讯云
npm config set registry https://mirrors.cloud.tencent.com/npm/
npm config set sass_binary_site https://mirrors.cloud.tencent.com/npm/node-sass
npm config set chromedriver_cdnurl https://mirrors.cloud.tencent.com/npm/chromedriver

# 恢复默认
npm config delete registry
```

## pip

```shell
mkdir ~/.pip
cat > ~/.pip/pip.conf << \EOF
[global]
index-url=https://pypi.doubanio.com/simple/
#index-url=https://mirrors.aliyun.com/pypi/simple/
#index-url=https://mirrors.cloud.tencent.com/pypi/simple/
EOF
```

## ruby gem

```shell
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
gem sources -l
# 确保输出只有 gems.ruby-china.com 一个
```

## bundle
## ruby bundle

```shell
bundle config mirror.https://rubygems.org https://gems.ruby-china.com
Expand Down

0 comments on commit 226d5e7

Please sign in to comment.