su LANG=C apt update apt upgrade -y
apt install -y sudo gpasswd -a user sudo
sudo apt install -y squid
sudo vim /etc/squid/squid.conf # 下記行を有効にする。 http_access allow localnet # # 下記行を追加する。 # <> 内は適宜修正のこと。login 以降は必要に応じて。 cache_peer <proxy-host> parent <proxy-port> 0 no-query login=<user>:<password> never_direct allow all never_direct allow CONNECT
systemctl squid restart
sudo sh -c "echo 'Acquire::http:::Proxy \"http://127.0.0.1:3128\";' > /etc/apt/apt.conf.d/80proxy"
sudo apt install git git config --global core.editor vim git config --global color.diff auto git config --global color.status auto git config --global color.branch auto git config --global http.proxy http://127.0.0.1:3128/
sudo apt install docker sudo gpasswd -a user docker sudo mkdir -p /etc/systemd/system/docker.service.d sudo sh -c "echo '[Service]' > /etc/systemd/system/docker.service.d/http-proxy.conf" sudo sh -c "echo 'Environment=\"HTTP_PROXY=http://127.0.0.1:3128/\" \"NO_PROXY=localhost,127.0.0.1\"' >> /etc/systemd/system/docker.service.d/http-proxy.conf"
※conteinerd も同様に。
sudo mkdir -p /etc/systemd/system/containerd.service.d/ sudo cp /etc/systemd/system/docker.service.d/http-proxy.conf /etc/systemd/system/containerd.service.d/
# <必要に応じて> # Docker Root の変更 sudo sh -c "echo '{ \"data-root\" : \"/export/var/lib/docker\" }' > /etc/docker/daemon.json"
# 設定反映 sudo systemctl daemon-reload sudo systemctl restart docker
sudo apt install exa
sudo apt install snapd
sudo snap install lxd sudo gpasswd -a user lxd sudo systemctl restart snapd sudo snap install core sudo sed -i 's/\(secure_path=.*\):\/bin"/\1:\/bin:\/snap\/bin"/' /etc/sudoers