VPS常用命令
新装VPS必用命令
root用户密码登录
root用户密钥登录
VPS重装系统脚本
Oracle DD系统后获取ipv6地址
V2ray安装
x-ui安装
PVE实用命令
speedtest-cli
OpenWrt接口配置示例
利用Cloudflare Tunnel实现内网穿透
ubuntu通过netplan设置静态ip
PVE温度显示以及去除弹窗脚本
Caddy示例配置文件
hysteria2的搭建与使用
Clash Meta配置模板
VPS流量监控脚本
rclone完全备份脚本
Oracle Cloud安装Alpine Linux
Caddy-dns的配置与使用
sing-box安装与配置
通过 CF Warp 为 IPv4/6 Only VPS 添加 IPv6/4 支持
流量转发脚本
ssh配置文件
rsync传输文件
阿里云盘CLi安装
Linux 设置IPv4优先
流量监控脚本
Openwrt中使用ddns-go加Caddy实现域名访问
NAT VPS 使用 Caddy 为内部服务提供 HTTPS 访问
Docker 多平台镜像构建与推送教程(arm64 主机示例)
本文档使用 MrDoc 发布
-
+
首页
新装VPS必用命令
### 常用工具 ```css apt update && apt install cron zip htop vim sudo curl wget unzip net-tools screenfetch ntp rsyslog -y ``` ### 时区修改 ```bash rm -rf /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && date ``` ### BBR开启 ```bash echo net.core.default_qdisc=fq >> /etc/sysctl.conf && echo net.ipv4.tcp_congestion_control=bbr >> /etc/sysctl.conf && sysctl -p && sysctl net.ipv4.tcp_available_congestion_control && lsmod | grep bbr ``` ```bash sudo tee /etc/sysctl.conf > /dev/null <<EOF net.core.default_qdisc = fq net.ipv4.tcp_congestion_control = bbr net.ipv4.ip_forward = 1 net.ipv4.tcp_window_scaling = 1 net.ipv4.tcp_adv_win_scale = -2 net.core.rmem_max = 33554432 net.core.wmem_max = 33554432 net.ipv4.tcp_rmem = 4096 131072 33554432 net.ipv4.tcp_wmem = 4096 16384 33554432 EOF sysctl -p lsmod | grep bbr ``` ### fail2ban安装配置 ```bash bash <(curl -fsSL https://github.com/zmh2024/Script/releases/download/v1.0/fail2ban-ssh-script.sh) ``` ### Docker安装 ```bash wget -qO- get.docker.com | bash && systemctl enable docker ``` ```bash curl -fsSL https://get.docker.com | bash -s docker && systemctl enable docker ``` rocky linux安装docker ```bash # 1. 安装 dnf-utils sudo dnf install -y dnf-utils # 2. 添加 Docker CE (Community Edition) 的稳定版仓库 sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo # 3. 安装 sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin # 4. 更新内核引导参数(可选,如果docker启动不了) grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0" reboot ``` #### 将用户加入docker组 ```bash sudo usermod -aG docker <username> sudo chmod a+rw /var/run/docker.sock sudo systemctl restart docker ``` ### Caddy安装 ```bash sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https && curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg && curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list && sudo apt update && sudo apt install caddy && systemctl enable caddy ``` Amazon Linux 2023安装caddy ```bash dnf copr enable @caddy/caddy epel-9-$(arch) yum -y install yum-plugin-copr yum -y copr enable @caddy/caddy epel-7-$(arch) yum -y install caddy ``` ### 甲骨文云oracle-cloud-agent装回 ```bash apt update && apt install snapd -y && snap install core && snap install oracle-cloud-agent --classic ``` ### 综合工具箱 ```bash wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh ``` ### 修改host文件以访问chatgpt ` vim /etc/hosts` ```bash 47.74.16.27 chat.openai.com 47.74.16.27 auth0.openai.com ``` ### rclone安装 ```bash curl https://rclone.org/install.sh | sudo bash ``` ### rclone示例备份脚本 ```bash #!/bin/sh rm -rf /root/app.zip zip -q -r /root/app.zip /root/app rclone copy /root/app.zip R2:vps-backup/seoul rclone copy /root/app.zip tebi:storage1/seoul ``` ### 三网测速脚本 ```bash bash <(wget -qO- https://down.vpsaff.net/linux/speedtest/superbench.sh) --speed ``` ### yabs ```bash curl -sL yabs.sh | bash ``` ### NodeQuality ```bash bash <(curl -sL https://run.NodeQuality.com) ``` ### 测试脚本合集 ```bash #superbench 检测脚本 wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash #bench 检测脚本 wget -qO- bench.sh | bash #zbench(中文)检测脚本 wget --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench-CN.sh && bash ZBench-CN.sh #zbench(英文)检测脚本 wget --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench.sh && bash ZBench.sh #LemonBench 综合检测脚本(检测耗时较长,建议screen) wget -qO- https://ilemonrain.com/download/shell/LemonBench.sh | bash -s full #独服硬盘通电时间检测脚本 wget -q https://github.com/Aniverse/A/raw/i/a && bash a #unixbench 性能跑分脚本 wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh && chmod +x unixbench.sh && ./unixbench.sh ```
koalalove
2025年11月24日 10:48
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
分享
链接
类型
密码
更新密码