使用Docker搭建Syncthing

Syncthing 官网:https://syncthing.net/ 在服务器上部署 Docker Debian 安装 Docker:https://docs.docker.com/engine/install/debian/ Ubuntu 安装 Docker:https://docs.docker.com/engine/install/ubuntu/ 拉取 syncthing 镜像 docker pull syncthing/syncthing 运行容器 docker run -d -p 8384:8384 -p 22000:22000 -v /data/syncthing:/var/syncthing –restart=always syncthing/syncthing:latest 参数解释: -d:后台运行 -p 8384:8384: 暴露 8384 端口,8384 是 Web 界面端口 -p 22000:22000:暴露…

Linux防火墙放行指定端口

Debian/Ubuntu 放行端口 安装iptables(通常系统都会自带,如果没有就需要安装) apt-get update apt-get install iptables 例如要放行8888端口 iptables -I INPUT -p tcp –dport 8888 -j ACCEPT 然后保存放行规则 iptables-save 设置完就已经放行了指定的端口,但重启后会失效,下面设置持续生效规则; 安装iptables-persistent apt-get install iptables-persistent 保存规则持续生效 netfilter-persistent save netfilter-persistent reload 设置完成后指定端口就会持续放行了;   Centos 放行端口 例如要放行8888端口 firewall-cmd –zone=public –add-port=8888/tcp –permanent 命令含义:…

VPS系统信息查看命令

系统 uname -a # 查看内核/操作系统/CPU信息 head -n 1 /etc/issue # 查看操作系统版本 cat /proc/cpuinfo # 查看CPU信息 hostname # 查看计算机名 lspci -tv # 列出所有PCI设备 lsusb -tv # 列出所有USB设备 lsmod # 列出加载的内核模块 env # 查看环境变量 资源 free -m # 查看内存使用量和交换区使用量 df -h #…

Debian 10 Buster 升级 Debian 11 Bullseye

准备工作 除非你是物理服务器,以及没有用过奇奇怪怪定制或修改的内核的 KVM 构架的 VPS 和云主机,否则升级大版本更新内核是有一定机率导致 Grub 加载失败的,切记备份重要数据! OpenVZ 6 和 LXC 构架的 VPS 是无法升级的,因为他们没有自己独立的内核 再强调一遍,一定要备份重要数据! 以下操作需要在 root 用户下完成,请使用 sudo -i 或 su root 切换到 root 用户进行操作 更新系统 首先需要更新你当前的系统 apt update apt upgrade -y apt dist-upgrade -y apt autoclean apt autoremove -y 如果内核更新了,可以重启让最新的内核生效,也可以直接进行升级。 升级系统…

Docker 搭建 calibre-web

官网地址:https://hub.docker.com/r/technosoft2000/calibre-web 1.获取 Docker 镜像: docker pull technosoft2000/calibre-web 启动 calibre-web: docker create –name=calibre-web –restart=always \ -v /data/calibre/books:/books \ -v /data/calibre/config:/calibre-web/config \ -e USE_CONFIG_DIR=true \ -e SET_CONTAINER_TIMEZONE=true \ -e CONTAINER_TIMEZONE=Asia/Shanghai \ -e PGID=65539 -e PUID=1029 \ -p 8083:8083 \ technosoft2000/calibre-web 3.上传 calibre…

Docker部署ServerStatus with tgbot

https://github.com/cppla/ServerStatus 服务端 mkdir /serverstatus cd /serverstatus mkdir plugin cd plugin curl -L https://raw.githubusercontent.com/cppla/ServerStatus/master/plugin/Dockerfile-telegram -O curl -L https://raw.githubusercontent.com/cppla/ServerStatus/master/plugin/bot-telegram.py -O cd /serverstatus curl -L https://raw.githubusercontent.com/cppla/ServerStatus/master/Dockerfile -O curl -L https://raw.githubusercontent.com/cppla/ServerStatus/master/docker-compose-telegram.yml -O nano docker-compose-telegram.yml   version: “3” services: serverstatus: build: context: . dockerfile: Dockerfile…