Debian12安装Netbird

使用 官方 一键脚本 https://docs.netbird.io/how-to/installation curl -fsSL https://pkgs.netbird.io/install.sh | sh 使用 官方 自定义 安装 sudo apt-get update sudo apt-get install ca-certificates curl gnupg -y 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 使用 CF 加速 sudo apt-get update sudo apt-get install ca-certificates curl gnupg -y 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://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 查看版本 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

五月 15, 2024 · 1 分钟 · 273 字 · 李光春

Debian:Linux安装Cloudflared

准备环境 apt-get update apt-get 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 使用 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 更新 apt-get update && apt-get upgrade 安装 apt-get update apt-get install 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

五月 15, 2024 · 1 分钟 · 120 字 · 李光春

Debian:Linux系统更换镜像源

Debian系统版本:12 自动更换镜像源 建议更换前执行 更换时间脚本 自动更换脚本 自写(Debian12) bash <(wget --no-check-certificate -qO- https://cdn.dtapp.net/linux/debian-change-source.sh) 自动更换脚本 宝塔写的第三方 bash <(wget --no-check-certificate -qO- https://cdn.dtapp.net/linux/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

五月 13, 2024 · 1 分钟 · 476 字 · 李光春

Linux:Portainer开启代理容器

拉起 Portainer Agent 镜像 docker pull portainer/agent:latest 编辑 docker-compose.yml 文件 nano docker-compose.yml docker-compose.yml 文件内容 version: "3.9" services: portainer_agent: # https://hub.docker.com/r/portainer/agent/tags image: portainer/agent:latest privileged: true # root权限,可无视 restart: always # 重启策略 volumes: - /var/run/docker.sock:/var/run/docker.sock - /var/lib/docker/volumes:/var/lib/docker/volumes ports: - "9001:9001" # tcp 端口 - "9001:9001/udp" # udp 端口 运行 docker-compose.yml 文件 docker compose up -d 查看端口是否开启 netstat -nlpt

五月 9, 2024 · 1 分钟 · 86 字 · 李光春

Debian:dpkg包管理

注意 下面的包名使用 cloudflared 来示范 包原文件后缀名 cloudflared.deb 安装包 dpkg -i cloudflared.deb 列出已安装的软件包以确认 cloudflared 是否已安装 dpkg -l | grep cloudflared 卸载 cloudflared dpkg --remove cloudflared 卸载 cloudflared 同时删除配置文件(如果不需要保留配置信息) dpkg --purge cloudflared 清除不再需要的依赖项 apt autoremove

四月 19, 2024 · 1 分钟 · 95 字 · 李光春

Debian:Linux系统更新

运行脚本 bash <(wget --no-check-certificate -qO- https://cdn.dtapp.net/linux/update_packages.sh) bash <(curl --insecure -s https://cdn.dtapp.net/linux/update_packages.sh) 更新 apt update apt upgrade apt update && apt upgrade 更话镜像源后更新 apt clean all apt update apt upgrade apt clean && apt update && apt upgrade

四月 19, 2024 · 1 分钟 · 48 字 · 李光春

Debian:卸载netbrid包

查询已安装的软件包,名为 netbird 开头的包 dpkg -l | grep '^ii.*netbird' -l: 列出系统中所有已安装的软件包。 grep '^ii': 过滤出那些表示“已安装”(ii)的行。 .*netbird: 包含字符串"netbird"的行。 先停止 netbird 服务 systemctl stop netbird.service 卸载 netbird apt remove netbird 卸载 netbird 同时删除配置文件(如果不需要保留配置信息) apt purge netbird 清除不再需要的依赖项 apt autoremove

四月 19, 2024 · 1 分钟 · 141 字 · 李光春

Linux:Cloudflare命令行

命令 cloudflared 帮助 cloudflared --help

四月 19, 2024 · 1 分钟 · 7 字 · 李光春

Linux:Docker更新到最新版本

查询当前版本 docker version --format '{{.Server.Version}}' 更新系统包 apt update apt upgrade 添加Docker官方存储库,需要提前安装 gpg curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null 更新软件包索引并安装Docker https://docs.docker.com/engine/release-notes/26.0/ apt update apt upgrade apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin 验证安装 docker --version

四月 19, 2024 · 1 分钟 · 95 字 · 李光春

Linux:Docker配置国内镜像源

修改 docker.daemon 文件 nano /etc/docker/daemon.json 添加 registry-mirrors 地址 { "registry-mirrors": ["https://xxx.mirror.aliyuncs.com"] } 重新载入服务 systemctl daemon-reload 重启 Docker 服务 systemctl restart docker.service

四月 19, 2024 · 1 分钟 · 32 字 · 李光春