25 lines
453 B
Bash
25 lines
453 B
Bash
|
|
|
|
# master节点
|
|
sudo apt update
|
|
sudo apt install -y apt-cacher-ng
|
|
|
|
|
|
systemctl status apt-cacher-ng
|
|
|
|
|
|
|
|
# worker节点
|
|
|
|
sudo tee /etc/apt/apt.conf.d/01proxy <<EOF
|
|
Acquire::http::Proxy "http://10.22.57.8:3142";
|
|
Acquire::https::Proxy "http://10.22.57.8:3142";
|
|
EOF
|
|
|
|
|
|
ssh root@${server} "printf '%s\n' \
|
|
'Acquire::http::Proxy \"http://10.22.57.8:3142\";' \
|
|
'Acquire::https::Proxy \"http://10.22.57.8:3142\";' \
|
|
| tee /etc/apt/apt.conf.d/01proxy >/dev/null"
|
|
|