三星台式机Debian13
#
root执行
#
echo "deb http://mirrors.aliyun.com/debian trixie main" > /etc/apt/sources.list
apt update
apt install -y curl docker-compose docker.io openssh-server sudo unzip wget
wget https://zian.netlify.app/debian/config.tgz
rm /etc/ssh/ssh_host_*key*
#/sbin/usermod -aG sudo docker
tar -zxvf config.tgz -C /
rm config.tgz
cp /root/.ssh /etc/skel/ -r
Docker优化
#
sudo sh -c 'echo {\"ipv6\": false,\"ip6tables\": false} > /etc/docker/daemon.json'
cat > proxy.conf << EOF
[Service]
Environment="HTTPS_PROXY=socks5://10.0.0.5:20170"
Environment="NO_PROXY=localhost,127.0.0.1,.cn"
EOF
sudo mkdir /etc/systemd/system/docker.service.d
sudo mv proxy.conf /etc/systemd/system/docker.service.d
sudo systemctl daemon-reload
sudo systemctl restart docker.socket docker.service
硬盘内存处理
#
- 查看硬盘ID ls -l /dev/disk/by-uuid/
- nofail如果有问题就跳过
sudo sed -i '$atmpfs /home/nginx/temp/tmp tmpfs defaults,mode=1777,size=6G 0 0' /etc/fstab
sudo sed -i '$aUUID=E76B-31F3 /home/nginx/samsung exfat defaults,nofail 0 2' /etc/fstab
sudo sed -i '$aUUID=EF9F-FBCE /home/nginx/toshiba exfat defaults,nofail 0 2' /etc/fstab
开机优化
#
sed -i 's|GRUB_TIMEOUT=5|GRUB_TIMEOUT=0|g' /etc/default/grub
sed -i 's|GRUB_CMDLINE_LINUX=""|GRUB_CMDLINE_LINUX="ipv6.disable=1"|g' /etc/default/grub
sudo update-grub
sudo reboot
命令别名
#
alias test2222='docker exec -it test bash'
alias server='docker exec -it server bash'
alias dnslog='docker exec -it dnsmasq sh -c "tail -fn20 /dns.log | grep reply"'
alias dps="docker ps -a --format 'table{{.Names}}\t{{.Image}}\t{{.Status}}'"
alias suspend="sudo systemctl suspend"
alias zian="docker exec -it zian bash"
alias xunlei="docker exec -it xunlei bash"
alias v2rayalog="docker logs -fn20 v2raya"