Debian安装SmartDNS带UI界面版本

效果图 前提条件 文件存放在/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 文件 [Unit] Description=SmartDNS Server After=network.target StartLimitBurst=0 StartLimitIntervalSec=60 [Service] Type=forking PIDFile=/root/smartdns/smartdns.pid ExecStart=/root/smartdns/ld-linux.so --library-path /root/smartdns /root/smartdns/smartdns -c /root/smartdns/smartdns.conf -p /root/smartdns/smartdns.pid Restart=always RestartSec=2 TimeoutStopSec=15 [Install] WantedBy=multi-user.target Alias=smartdns.service 具体程序参数请参考下方官方程序给出的解释 Usage: smartdns [OPTION]... Start smartdns server. -f run foreground. -c [conf] config file. -p [pid] pid file path, '-' means don't create pid file. -R restart smartdns when crash. -S ignore segment fault signal. -x verbose screen. -v display version. -h show this help message. Debug options: --cache-print [file] print cache. Online help: https://pymumu.github.io/smartdns Copyright (C) Nick Peng <[email protected]> 检查配置文件 smartdns.conf ,是否包含下面的配置 # 数据目录 data-dir /root/smartdns/db # 启用 UI 插件 plugin /root/smartdns/libsmartdns_ui.so # 设置 SmartDNS UI 的根目录 smartdns-ui.www-root /root/smartdns/www 赋值权限 chmod +x /root/smartdns/ld-linux.so chmod +x /root/smartdns/libsmartdns_ui.so chmod +x /root/smartdns/smartdns 启动服务 systemctl daemon-reload systemctl enable smartdns.service systemctl start smartdns.service

三月 20, 2025 · 1 分钟 · 292 字 · 李光春

Debian12开启IPv6

查看是否启用了 IPv6 cat /proc/sys/net/ipv6/conf/all/disable_ipv6 如果输出为 0,表示 IPv6 已启用 如果输出为 1,表示 IPv6 被禁用,需要启用它(按照下面方式) 编辑 /etc/sysctl.conf 文件 增加以下内容或修改以下内容:为0 net.ipv6.conf.all.disable_ipv6 = 0 net.ipv6.conf.default.disable_ipv6 = 0 应用更改 sysctl -p

三月 8, 2025 · 1 分钟 · 83 字 · 李光春

Debian12安装安装中文支持

确认系统已安装中文支持 apt update apt install locales dpkg-reconfigure locales 选择中文,例如 zh_CN.UTF-8,并设为默认语言 设置系统的语言环境 nano /etc/default/locale 将内容设置为: LANG=zh_CN.UTF-8 重新登陆

十二月 13, 2024 · 1 分钟 · 67 字 · 李光春

Debian12安装ZeroTier

使用 官方 一键脚本 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 检查是否使用了加速 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

十一月 14, 2024 · 1 分钟 · 181 字 · 李光春

Debian12安装Tailscale

使用 官方 一键脚本 https://tailscale.com/download/linux/debian-bookworm curl -fsSL https://tailscale.com/install.sh | sh 使用 官方 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 使用 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 查看版本 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

十一月 13, 2024 · 1 分钟 · 384 字 · 李光春

Debian:Linux安装Docker

安装(稳定版) https://docs.docker.com/engine/install/debian/ apt-get update && apt-get upgrade apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker version docker compose version 下面是安装最新版 准备环境 apt-get update apt-get install ca-certificates curl gnupg lsb-release install -m 0755 -d /etc/apt/keyrings 使用 官方 存储库 curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc chmod a+r /etc/apt/keyrings/docker.asc echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null 使用 火山引擎 存储库 curl -fsSL https://mirrors.volces.com/docker/linux/debian/gpg -o /etc/apt/keyrings/docker.asc chmod a+r /etc/apt/keyrings/docker.asc echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://mirrors.volces.com/docker/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null 安装 apt-get update && apt-get upgrade apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker version docker compose version

九月 26, 2024 · 1 分钟 · 135 字 · 李光春

Debian12安装Podman

安装(稳定版) https://podman.io/docs/installation#debian apt-get update apt-get install podman podman-compose podman version podman-compose version 下面是安装最新版 准备环境 apt-get update apt-get install curl gpg gnupg2 software-properties-common apt-transport-https lsb-release ca-certificates 下载并导入存储库的 GPG 密钥 wget http://downloadcontent.opensuse.org/repositories/home:/alvistack/Debian_12/Release.key -O alvistack_key cat alvistack_key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/alvistack.gpg >/dev/null 将存储库添加到系统 echo "deb http://downloadcontent.opensuse.org/repositories/home:/alvistack/Debian_12/ /" | sudo tee /etc/apt/sources.list.d/alvistack.list 安装 apt-get update && apt-get upgrade apt-get install podman python3-podman-compose netavark aardvark-dns criu podman version podman-compose version

九月 26, 2024 · 1 分钟 · 101 字 · 李光春

Debian:安装node_exporter

一键准备环境 mkdir node_exporter && cd node_exporter && wget https://files.m.daocloud.io/github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-amd64.tar.gz && tar -xvzf node_exporter-1.8.1.linux-amd64.tar.gz 编辑 systemd 文件 nano /etc/systemd/system/node_exporter.service [Unit] Description=Node Exporter After=network.target [Service] User=root ExecStart=/root/node_exporter/node_exporter-1.8.1.linux-amd64/node_exporter Restart=always [Install] WantedBy=multi-user.target 一键完成 sudo systemctl daemon-reload && sudo systemctl start node_exporter && sudo systemctl enable node_exporter && sudo systemctl status node_exporter && netstat -nlpt 创建文件夹 mkdir node_exporter && cd node_exporter 进入文件夹 cd node_exporter 下载文件 wget https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-amd64.tar.gz 下载文件(加速) wget https://files.m.daocloud.io/github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-amd64.tar.gz 解压文件并进入 tar -xvzf node_exporter-1.8.1.linux-amd64.tar.gz 进入解压文件夹 cd node_exporter-1.8.1.linux-amd64 编辑 systemd 文件 nano /etc/systemd/system/node_exporter.service [Unit] Description=Node Exporter After=network.target [Service] User=root ExecStart=/root/node_exporter/node_exporter-1.8.1.linux-amd64/node_exporter Restart=always [Install] WantedBy=multi-user.target 重新加载配置 sudo systemctl daemon-reload 启动服务 sudo systemctl start node_exporter 设置开机自启 sudo systemctl enable node_exporter 查看状态 sudo systemctl status node_exporter 查看端口9100是否开启 netstat -nlpt

六月 27, 2024 · 1 分钟 · 178 字 · 李光春

Debian:配置DNS

查看当前DNS配置 cat /etc/resolv.conf 编辑DNS配置文件 nano /etc/resolv.conf nameserver 10.0.0.200 nameserver 119.29.29.29 nameserver 2402:4e00:: nameserver 223.5.5.5 nameserver 2400:3200::1 nameserver 180.76.76.76 nameserver 2400:da00::6666 nameserver 180.184.1.1 nameserver 8.8.8.8 nameserver 2001:4860:4860::8888 nameserver 1.1.1.1 nameserver 2606:4700:4700::1111 nameserver 208.67.222.222 nameserver 2620:0:ccc::2 nameserver 192.168.101.199 nameserver 119.29.29.29 nameserver 2402:4e00:: nameserver 223.5.5.5 nameserver 2400:3200::1 nameserver 180.76.76.76 nameserver 2400:da00::6666 nameserver 180.184.1.1 nameserver 8.8.8.8 nameserver 2001:4860:4860::8888 nameserver 1.1.1.1 nameserver 2606:4700:4700::1111 nameserver 208.67.222.222 nameserver 2620:0:ccc::2

五月 22, 2024 · 1 分钟 · 78 字 · 李光春

Debian:Linux安装TinyCP

准备环境 apt update apt install apt-transport-https dirmngr ca-certificates curl gnupg -y 添加官方存储库 curl -fsSL http://repos.tinycp.com/debian/conf/gpg.key | gpg --dearmor -o /usr/share/keyrings/tinycp-archive-keyring.gpg deb [signed-by=/usr/share/keyrings/tinycp-archive-keyring.gpg] http://repos.tinycp.com/debian all main 安装 apt update apt install tinycp

五月 20, 2024 · 1 分钟 · 41 字 · 李光春