视频加载失败

VPS 命令脚本备份

346 字
2 分钟
VPS 命令脚本备份

常用命令#

切换到 root 用户#

Terminal window
sudo -i

更新系统和依赖#

Debian / Ubuntu:

Terminal window
apt update -y
apt install -y curl socat wget
apt-get install sudo

CentOS:

Terminal window
yum update -y
yum install -y curl socat

防火墙相关#

Terminal window
firewall-cmd --state # 查看防火墙状态
systemctl stop firewalld.service # 停止防火墙
systemctl disable firewalld.service # 禁止防火墙开机自启

Debian 开启原生 BBR#

Terminal window
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

查看系统信息#

Terminal window
wget -qO- bench.sh | bash

修改密码#

Terminal window
passwd

常用脚本#

VPS 测速#

Terminal window
wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash

回程测试#

Terminal window
curl https://raw.githubusercontent.com/zhucaidan/mtr_trace/main/mtr_trace.sh | bash

ServerStatus#

Terminal window
# 国外机
wget https://raw.githubusercontent.com/cokemine/ServerStatus-Hotaru/master/status.sh
# 国内机
wget https://cokemine.coding.net/p/hotarunet/d/ServerStatus-Hotaru/git/raw/master/status.sh

面板安装#

1Panel#

Terminal window
curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && bash quick_start.sh

宝塔面板(Debian)#

Terminal window
wget -O install.sh http://download.moetas.com/install/install-ubuntu_6.0.sh && sudo bash install.sh

X-UI#

Terminal window
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)

DD 系统重装#

甲骨文 ARM DD#

Terminal window
curl -fLO https://raw.githubusercontent.com/bohanyang/debi/master/debi.sh
chmod a+rx debi.sh
sudo ./debi.sh --architecture arm64 --user root --password password
sudo shutdown -r now
# 默认密码:password

DD Debian 10(64 位)#

Terminal window
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 10 -v 64 -a
# 默认密码:MoeClub.org

国内 VPS DD Debian 11#

Terminal window
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 11 -v 64 -a --mirror 'https://mirrors.huaweicloud.com/debian/' -p password

Docker 应用#

青龙面板#

Terminal window
docker run -dit \
--name QL \
--hostname QL \
--restart always \
-p 5777:5777 \
-v $PWD/QL/config:/ql/config \
-v $PWD/QL/log:/ql/log \
-v $PWD/QL/db:/ql/db \
-v $PWD/QL/scripts:/ql/scripts \
-v $PWD/QL/jbot:/ql/jbot \
whyour/qinglong:latest

其他#

腾讯云去监控#

Terminal window
sudo -i
systemctl stop tat_agent
systemctl disable tat_agent
/usr/local/qcloud/stargate/admin/uninstall.sh
/usr/local/qcloud/YunJing/uninst.sh
/usr/local/qcloud/monitor/barad/admin/uninstall.sh
rm -f /etc/systemd/system/tat_agent.service
rm -rf /usr/local/qcloud
rm -rf /usr/local/sa
rm -rf /usr/local/agenttools
process=(sap100 secu-tcs-agent sgagent64 barad_agent agent agentPlugInD pvdriver)
for i in ${process[@]}
do
for A in $(ps aux | grep $i | grep -v grep | awk '{print $2}')
do
kill -9 $A
done
done

文章分享

如果这篇文章对你有帮助,欢迎分享给更多人!

VPS 命令脚本备份
https://llxx.cc/posts/2026/11/vps-commands-backup/
作者
777
发布于
2026-11-04
许可协议
CC BY-NC-SA 4.0
Profile Image of the Author
777
记录技术、生活与思考。
分类
标签
站点统计
文章
3
分类
1
标签
7
总字数
5,081
运行时长
0 天
最后活动
0 天前
站点信息
构建平台
EdgeOne Pages
博客版本
Firefly v6.16.9
文章许可
CC BY-NC-SA 4.0
文章目录