Debian系统开机一条龙
1、DD系统
curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh && bash reinstall.sh debian 12 --password 密码 --ssh-port 端口2、执行脚本:
apt update && apt install -y curl && bash <(curl -fsSL https://raw.githubusercontent.com/LucaLin233/Linux/refs/heads/main/debian_setup.sh)代码审查:
https://github.com/LucaLin233/Linux/blob/main/debian_setup.sh
可选项
1、禁用密码登录:
sudo sed -i 's/^#*PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config && sudo systemctl restart sshd如果是bin456789 DD的debian系统,请先运行:
rm -rf /etc/ssh/sshd_config.d/01-permitrootlogin.conf2、更换内核:
curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xD38D7D1DA1349567ADED882D86F7D09EE734E623" \
| sudo gpg --dearmor -o /usr/share/keyrings/xanmod-archive-keyring.gpgecho 'deb [signed-by=/usr/share/keyrings/xanmod-archive-keyring.gpg] http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-release.listsudo apt update && sudo apt install -y linux-xanmod-x64v33、开启Swap:
sudo fallocate -l 1G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile && echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab移除swap:
sudo swapoff /swapfile && sudo sed -i '\#^/swapfile none swap sw 0 0#d' /etc/fstab && sudo rm /swapfile4、内核调优:
查看状态:
curl -fsSL https://raw.githubusercontent.com/LucaLin233/Linux/refs/heads/main/tools/kernel.sh | bash -s status恢复配置:
curl -fsSL https://raw.githubusercontent.com/LucaLin233/Linux/refs/heads/main/tools/kernel.sh | bash -s restore优化无国内优化服务时:
curl -fsSL https://raw.githubusercontent.com/LucaLin233/Linux/refs/heads/main/tools/kernel.sh | bash -s install -i优化国内优化服务器时:
curl -fsSL https://raw.githubusercontent.com/LucaLin233/Linux/refs/heads/main/tools/kernel.sh | bash -s install -c交互版:
curl -fsSL https://raw.githubusercontent.com/LucaLin233/Linux/refs/heads/main/tools/kernel.sh | bash -s install5、安装syncthing
sudo mkdir -p /etc/apt/keyrings && \
sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable-v2" | sudo tee /etc/apt/sources.list.d/syncthing.list && \
sudo apt update && \
sudo apt install syncthing && \
sudo systemctl enable syncthing@root.service && \
sudo systemctl start syncthing@root.service6、路由追踪(可从一键部署脚本中选择安装):
curl -sL nxtrace.org/nt | bash7、修改系统dns:
bash <(curl -L -s https://raw.githubusercontent.com/1-stream/1stream-public-utils/main/dns-change.sh) 127.0.0.1 1.1.1.18、安装Cloudflare Tunnel
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/LucaLin233/Linux/refs/heads/main/tools/cloudflare_tunnel.sh)" -- install卸载:
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/LucaLin233/Linux/refs/heads/main/tools/cloudflare_tunnel.sh)" -- uninstall9、多功能脚本:
wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/jklolixxs/jms/main/jms.sh" && chmod 700 /root/jms.sh && /root/jms.sh Bash10、流媒体解锁检测:
bash <(curl -L -s https://github.com/1-stream/RegionRestrictionCheck/raw/main/check.sh)11、修改语言为中文:
apt update && \
apt install -y locales && \
sed -i 's/^# *zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen && \
update-locale LANG=zh_CN.UTF-8 LANGUAGE=zh_CN:zh LC_ALL=zh_CN.UTF-812、IP质量检测:
bash <(curl -sL IP.Check.Place)