- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2022-10-28T15:45:48+09:00","","")
#author("2023-07-19T00:46:54+09:00","","")
[[Smile:D]]
* Linux 基本設定 [#z5995ef2]
su
LANG=C
apt update
apt upgrade -y
** sudo [#mfa3363c]
apt install -y sudo
gpasswd -a user sudo
** squid [#jb340eb3]
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
** apt [#vbb07e04]
sudo sh -c "echo 'Acquire::http:::Proxy \"http://127.0.0.1:3128\";' > /etc/apt/apt.conf.d/80proxy"
sudo sh -c "echo 'Acquire::http::Proxy \"http://127.0.0.1:3128\";' > /etc/apt/apt.conf.d/80proxy"
** git [#g5f83e43]
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/
git config --global https.proxy http://127.0.0.1:3128/
** Docker [#mf01e7d9]
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
** exa [#z4fcec07]
sudo apt install exa
** snap [#b996f15c]
sudo apt install snapd
** LXD [#dd757d08]
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