Debian安装SmartDNS带UI界面47版本
在 Debian 系统上安装 SmartDNS 47 版本并启用 Web UI 管理界面
在 Debian 系统上安装 SmartDNS 47 版本并启用 Web UI 管理界面
Debian从Bookworm升级到Trixie
⚠️ 教程发布时间过久,请使用下面的教程 📖 👉 Debian安装SmartDNS带UI界面47版本 效果图 前提条件 文件存放在/root/smartdns目录下,请根据自己情况修改 下载需要的软件包 根据系统版本下载对应的版本 https://github.com/user-attachments/files/18922855/smartdns-with-webui-x86_64.tar.gz https://github.com/user-attachments/files/18922865/smartdns-with-webui-aarch64.tar.gz 解压文件 复制旧的配置文件到/root/smartdns目录下,替换 smartdns.conf 文件 (根据需求选择是否替换) 准备服务文件 编辑 nano /lib/systemd/system/smartdns.service 文件 ...
使用 官方 一键脚本 https://www.zerotier.com/download/#entry-5 curl -s https://install.zerotier.com | sudo bash 使用 官方 echo 'deb [signed-by=/usr/share/keyrings/zerotier-debian-package-key.gpg] http://download.zerotier.com/debian/bookworm bookworm main' | tee /etc/apt/sources.list.d/zerotier.list 使用 CF 加速 echo 'deb [signed-by=/usr/share/keyrings/zerotier-debian-package-key.gpg] https://asw-mirror.dtapp.top/zerotier/debian/bookworm bookworm main' | tee /etc/apt/sources.list.d/zerotier.list 使用 中国科学技术大学 加速 echo 'deb [signed-by=/usr/share/keyrings/zerotier-debian-package-key.gpg] https://mirrors.ustc.edu.cn/zerotier/debian bookworm main' | tee /etc/apt/sources.list.d/zerotier.list 使用 南京大学 加速 echo 'deb [signed-by=/usr/share/keyrings/zerotier-debian-package-key.gpg] https://mirror.nju.edu.cn/zerotier/debian bookworm main' | tee /etc/apt/sources.list.d/zerotier.list 使用 哈尔滨工业大学 加速 echo 'deb [signed-by=/usr/share/keyrings/zerotier-debian-package-key.gpg] https://mirrors.hit.edu.cn/zerotier/debian bookworm main' | tee /etc/apt/sources.list.d/zerotier.list 检查是否使用了加速 cat /etc/apt/sources.list.d/zerotier.list 更新 apt update apt install zerotier-one 卸载 systemctl stop zerotier-one apt remove zerotier-one apt purge zerotier-one 查看信息 zerotier-cli info 查看状态 zerotier-cli status 查看全部设备 zerotier-cli listpeers zerotier-cli peers 查看全部网络 zerotier-cli listnetworks 加入网络 zerotier-cli join <NetworkID> 离开网络 zerotier-cli leave <NetworkID> 查看全部moon zerotier-cli listmoons 加入moon zerotier-cli orbit <WorldID> <WorldID> 离开moon zerotier-cli deorbit <WorldID> 禁用 (停止服务和禁自启) systemctl stop zerotier-one.service && systemctl disable zerotier-one.service 恢复 (启动服务和自启) systemctl start zerotier-one.service && systemctl enable zerotier-one.service
一键安装脚本 bash <(curl --insecure -s https://mirrors.dtapp.net/update_packages.sh) 准备环境 apt update apt install ca-certificates curl gnupg mkdir -p --mode=0755 /usr/share/keyrings 下载凭证 curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg | tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null 使用 官方 echo 'deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/debian bookworm main' | tee /etc/apt/sources.list.d/tailscale.list 使用 EO 加速 echo 'deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://mirrors.dtapp.net/tailscale bookworm main' | tee /etc/apt/sources.list.d/tailscale.list 使用 CF 加速 echo 'deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://asw-mirror.dtapp.top/tailscale/debian bookworm main' | tee /etc/apt/sources.list.d/tailscale.list 检查是否使用了加速 cat /etc/apt/sources.list.d/tailscale.list 安装/更新 apt update apt install tailscale 卸载 apt remove tailscale 查看版本 tailscale version 查看当前IP地址 tailscale ip 查看网络状况 tailscale netcheck 检测节点 tailscale ping ip 查看全部设备状态 tailscale status # 第1列 设备IP # 第2列 设备名称 # 第3列 设备邮箱地址 # 第4列 设备操作系统 # 第5列 设备当前状态 active=正在使用流量 idle=没有流量使用 禁用 (停止服务和禁自启) systemctl stop tailscaled.service && systemctl disable tailscaled.service 恢复 (启动服务和自启) systemctl start tailscaled.service && systemctl enable tailscaled.service lxc容器环境下安装完提示如下问题 Failed to connect to local Tailscale daemon for /localapi/v0/profiles/; systemd tailscaled.service not running. Error: dial unix /var/run/tailscale/tailscaled.sock: connect: no such file or directory failed to connect to local tailscaled; it doesn't appear to be running (sudo systemctl start tailscaled ?) 大概率是tun权限问题 修改容器配置文件 nano /etc/pve/lxc/容器id.conf 增加下方代码 # 允许容器内的程序访问 /dev/net/tun 设备,给予读取、写入和创建权限 lxc.cgroup2.devices.allow: c 10:200 rwm # 将宿主机上的 /dev/net/tun 设备文件挂载到容器内的相同路径 lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file 重启lxc容器 pct reboot 容器id
一键安装脚本 bash <(curl --insecure -s https://mirrors.dtapp.net/update_packages.sh) 准备环境 apt update apt install ca-certificates curl gnupg mkdir -p --mode=0755 /usr/share/keyrings 下载凭证 curl -sSL https://pkgs.netbird.io/debian/public.key | sudo gpg --dearmor --output /usr/share/keyrings/netbird-archive-keyring.gpg 使用 官方 echo 'deb [signed-by=/usr/share/keyrings/netbird-archive-keyring.gpg] https://pkgs.netbird.io/debian stable main' | sudo tee /etc/apt/sources.list.d/netbird.list 使用 EO 加速 echo 'deb [signed-by=/usr/share/keyrings/netbird-archive-keyring.gpg] https://mirrors.dtapp.net/netbird stable main' | tee /etc/apt/sources.list.d/netbird.list 使用 CF 加速 echo 'deb [signed-by=/usr/share/keyrings/netbird-archive-keyring.gpg] https://asw-mirror.dtapp.top/netbird/debian stable main' | tee /etc/apt/sources.list.d/netbird.list 检查是否使用了加速 cat /etc/apt/sources.list.d/netbird.list 安装/更新 apt update apt install netbird 卸载 apt remove netbird 查看版本 netbird version 查看状态 netbird version 启动 netbird up --management-url https://xxx.xxx.net --admin-url https://xxx.xxx.net --setup-key XXX-XX-XX-XXX 禁用 (停止服务和禁自启) systemctl stop netbird.service && systemctl disable netbird.service 恢复 (启动服务和自启) systemctl start netbird.service && systemctl enable netbird.service PVE下问题 telnet xxx.xxx.net 8443 如发现解析到了127.0.0.1,请检查/etc/hosts文件 Docker 安装 services: netbird.client: image: docker.1ms.run/netbirdio/netbird:0.35.1 container_name: netbird.client restart: unless-stopped #restart: always network_mode: host cap_add: - NET_ADMIN - SYS_ADMIN - SYS_RESOURCE environment: - NB_SETUP_KEY=xxxx-x-x-x-xxxx - NB_ADMIN_URL=https://netbird.xxx.xx - NB_MANAGEMENT_URL=https://netbird.xxx.xx volumes: - /etc/localtime:/etc/localtime:ro - /root/docker_work/netbird/data:/etc/netbird:rw Podman 安装 services: netbird.client: image: docker.1ms.run/netbirdio/netbird:0.35.0 container_name: netbird.client restart: unless-stopped #restart: always network_mode: host privileged: true cap_add: - NET_ADMIN - SYS_ADMIN - SYS_RESOURCE environment: - NB_SETUP_KEY=xxxx-x-x-x-xxxx - NB_ADMIN_URL=https://netbird.xxx.xx - NB_MANAGEMENT_URL=https://netbird.xxx.xx volumes: - /etc/localtime:/etc/localtime:Z - /root/podman_work/netbird/data:/etc/netbird:z
一键安装脚本 bash <(curl --insecure -s https://mirrors.dtapp.net/update_packages.sh) 准备环境 apt update apt install ca-certificates curl gnupg mkdir -p --mode=0755 /usr/share/keyrings 下载凭证 curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null 使用 官方 echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared bookworm main' | tee /etc/apt/sources.list.d/cloudflared.list 使用 EO 加速 echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://mirrors.dtapp.net/cloudflared bookworm main' | tee /etc/apt/sources.list.d/cloudflared.list 使用 CF 加速 echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://asw-mirror.dtapp.top/cloudflared/cloudflared bookworm main' | tee /etc/apt/sources.list.d/cloudflared.list 检查是否使用了加速 cat /etc/apt/sources.list.d/cloudflared.list 安装/更新 apt update apt install cloudflared 卸载 apt remove cloudflared 验证安装 cloudflared --help 启动 cloudflared service install xxx journalctl -u cloudflared -f 频繁掉线问题 # 修改服务文件 nano /etc/systemd/system/cloudflared.service # 在 ExecStart 的 tunnel run 后面加上 --protocol http2 或 --protocol auto --protocol http2 # 重启服务 systemctl restart cloudflared
Debian系统版本:12 自动更换镜像源 建议更换前执行 更换时间脚本 自动更换脚本 自写(Debian12) bash <(wget --no-check-certificate -qO- https://mirrors.dtapp.net/debian-change-source.sh) 自动更换脚本 宝塔写的第三方 bash <(wget --no-check-certificate -qO- https://mirrors.dtapp.net/fix_source.sh) 建议更换后执行 系统更新脚本 手动更换镜像源 deb-src=源码仓库 apt install apt-transport-https ca-certificates 手动更换为 阿里云镜像站 编辑 /etc/apt/sources.list 文件 # https://developer.aliyun.com/mirror/debian deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib deb https://mirrors.aliyun.com/debian-security/ bookworm-security main deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib 手动更换为 腾讯云镜像站 编辑 /etc/apt/sources.list 文件 # https://mirrors.cloud.tencent.com/help/debian.html deb https://mirrors.cloud.tencent.com/debian/ bookworm main non-free non-free-firmware contrib deb-src https://mirrors.cloud.tencent.com/debian/ bookworm main non-free non-free-firmware contrib deb https://mirrors.cloud.tencent.com/debian-security bookworm-security main deb-src https://mirrors.cloud.tencent.com/debian-security bookworm-security main deb https://mirrors.cloud.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib deb-src https://mirrors.cloud.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib deb https://mirrors.cloud.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib deb-src https://mirrors.cloud.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib 手动更换为 华为云镜像站 编辑 /etc/apt/sources.list 文件 # https://mirrors.huaweicloud.com/mirrorDetail/5ea14e0757bdf83a14170fdf?mirrorName=debian&catalog=os%2Flogin deb https://mirrors.huaweicloud.com/debian/ bookworm main non-free non-free-firmware contrib deb-src https://mirrors.huaweicloud.com/debian/ bookworm main non-free non-free-firmware contrib deb https://mirrors.huaweicloud.com/debian/ bookworm-updates main non-free non-free-firmware contrib deb-src https://mirrors.huaweicloud.com/debian/ bookworm-updates main non-free non-free-firmware contrib deb https://mirrors.huaweicloud.com/debian/ bookworm-backports main non-free non-free-firmware contrib deb-src https://mirrors.huaweicloud.com/debian/ bookworm-backports main non-free non-free-firmware contrib deb https://mirrors.huaweicloud.com/debian-security/ bookworm-security main deb-src https://mirrors.huaweicloud.com/debian-security/ bookworm-security main 手动更换为 火山引擎镜像站 编辑 /etc/apt/sources.list 文件 # https://developer.volcengine.com/articles/7275535526869155859 deb https://mirrors.volces.com/debian/ bookworm main non-free non-free-firmware contrib deb-src https://mirrors.volces.com/debian/ bookworm main non-free non-free-firmware contrib deb https://mirrors.volces.com/debian/ bookworm-updates main non-free non-free-firmware contrib deb-src https://mirrors.volces.com/debian/ bookworm-updates main non-free non-free-firmware contrib deb https://mirrors.volces.com/debian/ bookworm-backports main non-free non-free-firmware contrib deb-src https://mirrors.volces.com/debian/ bookworm-backports main non-free non-free-firmware contrib deb https://mirrors.volces.com/debian-security/ bookworm-security main deb-src https://mirrors.volces.com/debian-security/ bookworm-security main 手动更换为 校园网联合镜像站(mirrorz-302 智能选择) 编辑 /etc/apt/sources.list 文件 # https://help.mirrors.cernet.edu.cn/debian/?mirror=CERNET deb https://mirrors.cernet.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb-src https://mirrors.cernet.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb https://mirrors.cernet.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb-src https://mirrors.cernet.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.cernet.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb-src https://mirrors.cernet.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb https://mirrors.cernet.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware deb-src https://mirrors.cernet.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
运行脚本 bash <(wget --no-check-certificate -qO- https://mirrors.dtapp.net/update_packages.sh) bash <(curl --insecure -s https://mirrors.dtapp.net/update_packages.sh) 更新 apt update apt upgrade apt update && apt upgrade 更话镜像源后更新 apt clean all apt update apt upgrade apt clean && apt update && apt upgrade
运行脚本 bash <(wget --no-check-certificate -qO- https://mirrors.dtapp.net/change_timezone.sh) bash <(curl --insecure -s https://mirrors.dtapp.net/change_timezone.sh) 脚本提示 请选择要设置的时区: 1. 中国标准时间 (CST) - Asia/Shanghai 2. 美国东部时间 (EST) - America/New_York 3. 英国格林尼治标准时间 (GMT) - Europe/London 输入对应的数字并按 Enter 键: 即可根据提示输入对应的数字就可以完成时区的设置