0. 前置条件-添加host

vi /etc/hosts
### 追加一行 10.251.102.1 mirrors.shanhe.com
10.251.102.1 mirrors.shanhe.com
## 保存后退出 :wq

1. ubuntu18.04

cat > /etc/apt/sources.list << "EOF"
deb https://mirrors.shanhe.com/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.shanhe.com/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.shanhe.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.shanhe.com/ubuntu/ bionic-security main restricted universe multiverse

deb https://mirrors.shanhe.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.shanhe.com/ubuntu/ bionic-updates main restricted universe multiverse

deb https://mirrors.shanhe.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.shanhe.com/ubuntu/ bionic-backports main restricted universe multiverse

## Not recommended
# deb http://mirrors.shanhe.com/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src http://mirrors.shanhe.com/ubuntu/ bionic-proposed main restricted universe multiverse
EOF

2. ubuntu20.04

cat > /etc/apt/sources.list << "EOF"
deb https://mirrors.shanhe.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.shanhe.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.shanhe.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.shanhe.com/ubuntu/ focal-security main restricted universe multiverse

deb https://mirrors.shanhe.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.shanhe.com/ubuntu/ focal-updates main restricted universe multiverse

deb https://mirrors.shanhe.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.shanhe.com/ubuntu/ focal-backports main restricted universe multiverse

## Not recommended
# deb http://mirrors.shanhe.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src http://mirrors.shanhe.com/ubuntu/ focal-proposed main restricted universe multiverse
EOF

3. ubuntu22.04

cat > /etc/apt/sources.list << "EOF"
deb https://mirrors.shanhe.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.shanhe.com/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.shanhe.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.shanhe.com/ubuntu/ jammy-security main restricted universe multiverse

deb https://mirrors.shanhe.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.shanhe.com/ubuntu/ jammy-updates main restricted universe multiverse

deb https://mirrors.shanhe.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.shanhe.com/ubuntu/ jammy-backports main restricted universe multiverse

## Not recommended
# deb http://mirrors.shanhe.com/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src http://mirrors.shanhe.com/ubuntu/ jammy-proposed main restricted universe multiverse
EOF
作者:admin  创建时间:2023-03-21 16:04
最后编辑:admin  更新时间:2024-04-28 09:41