更新列表
综合工具箱(强烈推荐,集成了很多脚本)
wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh
科技 lion
apt update -y && apt install -y curl
bash <(curl -sL kejilion.sh)
SKY-BOX
wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh
10、其它
TG 中文汉化
https://t.me/setlanguage/classic-zh-cn
杜甫测试
wget -q https://github.com/Aniverse/A/raw/i/a && bash a
sudo apt update
sudo apt install python3-prettytable -y
bash <(wget -qO- git.io/ceshi) -j
DD 相关
1、甲骨文 DD 脚本
DD 成 Debian 10
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 10 -v 64 -p "自定义root密码" -port "自定义ssh端口"
DD 成 Ubuntu 20.04
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -u 20.04 -v 64 -p "自定义root密码" -port "自定义ssh端口"
2、MoeClub 脚本
重点推荐:
时间:22/11/2021 15:21 萌咖更新脚本:
1. 新增对 Oracle AMD,Oracle ARM 全面支持. 可支持从 Ubuntu, Oracle Linux 等系统网络重装.
2. 更新 dd 镜像的基础系统版本.
3. 移除对外部 wget 的依赖.
4. 新增 -port 参数, 可更改默认 SSH 端口.
5. 更新 内置的网络参数计算 逻辑.
6. 更新 grub 配置文件定位逻辑, 可支持任意引导 grub 的系统.
以下系统已通过测试 (其他自测):
Debian: 9, 10, 11;
Ubuntu: 18.04, 20.04;
CentOS: 6.10;
以下平台已通过测试 (其他自测):
Oracle、Do、Azure
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 10 -v 64 -p "自定义root密码" -port "自定义ssh端口"
-d 10 -v 64
-d 9 -v 64
-u 20.04 -v 64
-u 18.04 -v 64
开机改密码脚本:
开机改密:
#!/bin/bash
echo root:Vicer |sudo chpasswd root
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo reboot
3、另一位大佬的脚本
wget --no-check-certificate -O AutoReinstall.sh https://git.io/AutoReinstall.sh && bash AutoReinstall.sh
-
CentOS 默认密码 Pwd@CentOS 其它系统 Pwd@Linux
-
OpenVZ / LXC 架构系统不适用
来源:https://blog.hicasper.com/post/135.html 参考:https://www.ydyno.com/archives/1245.html 感谢大佬的付出!
bash <(wget --no-check-certificate -qO- 'https://file.geekn.net/CNODnjau/InstallNET.sh') -d 11 -v 64 -a -firmware
-firmware 额外的驱动支持
-d 后面是系统版本号
-v 后面写 64 位 32 位
-a (不清楚这个干啥的但是每个脚本都带)
–mirror 后面是镜像源地址
-p 后面写自定义密码
镜像站地址
官方给出的地址列表:https://www.debian.org/mirror/list
一些国内的
ftp.cn.debian.org
mirror.bjtu.edu.cn
mirror.lzu.edu.cn
mirror.nju.edu.cn
mirrors.163.com
mirrors.bfsu.edu.cn
mirrors.hit.edu.cn
mirrors.huaweicloud.com
mirror.sjtu.edu.cn
mirrors.tuna.tsinghua.edu.cn
mirrors.ustc.edu.cn
使用方法:(大致都是一样的)
清华源
--mirror 'https://mirrors.ustc.edu.cn/debian/'
腾讯源
--mirror 'https://mirrors.aliyun.com/debian/'
阿里源
--mirror 'https://mirrors.aliyun.com/debian/'
华为源
--mirror 'https://mirrors.huaweicloud.com/debian/'
另一个 DD 脚本
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh && bash InstallNET.sh -debian 11 -pwd 密码 -port 端口
4、秋水逸冰 Windows 2012/2016/2019/2022 10/11 DD 镜像
适用于 UEFI 启动的多个 Windows 系统 DD 镜像:
分别是:
-
Windows Server 2012 R2 Datacenter
-
Windows Server 2016 Datacenter (build: 14393.5006)
-
Windows Server 2019 Datacenter (build: 17763.2686)
-
Windows Server 2022 Datacenter (build: 20348.587)
-
Windows 10 Enterprise LTSC (build: 19044.1288)
-
Windows 11 Pro for Workstations 21H2 (build: 22000.194)
适用于 BIOS 启动的 Windows Server 2022 Datacenter DD 镜像:
适用于 BIOS 启动的 Windows 11 Pro for Workstations 21H2 DD 镜像:
适用于 BIOS 启动的 Windows 10 Enterprise LTSC DD 镜像:
适用于 BIOS 启动的 Windows Server 2019/2016/2012R2 Datacenter DD 镜像:
分别是:
-
Windows Server 2019 Datacenter(Build: 17763.2686)
-
Windows Server 2016 Datacenter(Build: 14393.5006)
-
Windows Server 2012 R2 Datacenter
测试相关
机器测试
基本测试
请出秋水的 bench.sh 脚本,这个脚本可以查看 Linux 系统信息,还可以测试网络带宽及硬盘读写速率。
wget -qO- bench.sh | bash
GeekBench
GB6 跑分脚本,附带宽测试:
curl -sL yabs.sh | bash
GB6 剔除带宽测试,因为都是国外节点测试,国内跑没多大意义:
curl -sL yabs.sh | bash -s -- -i
GB5 跑分脚本,附带宽测试:
curl -sL yabs.sh | bash -5
GB5 剔除带宽测试:
curl -sL yabs.sh | bash -s -- -i -5
来源:https://github.com/masonr/yet-another-bench-script
单线程测试
bash <(curl -Lso- https://bench.im/hyperspeed)
最全测速脚本
国内测速:
bash <(curl -sL res.yserver.ink/taier.sh)
curl -fsL https://ilemonra.in/LemonBenchIntl | bash -s fast
superbench
wget -qO- git.io/superbench.sh | bash
Bench.sh
wget -qO- bench.sh | bash
速度测试
显示延迟、抖动
bash <(wget -qO- https://bench.im/hyperspeed)
直接显示回程线路
curl https://raw.githubusercontent.com/zhucaidan/mtr_trace/main/mtr_trace.sh|bash
wget -q route.f2k.pub -O route && bash route
# 第一个
wget https://raw.githubusercontent.com/nanqinlang-script/testrace/master/testrace.sh
bash testrace.sh
# 第二个
wget -qO- git.io/besttrace | bash
四网测速
wget -O jcnf.sh https://raw.githubusercontent.com/Netflixxp/jcnfbesttrace/main/jcnf.sh
bash jcnf.sh
三网测速
bash <(curl -Lso- https://git.io/superspeed_uxh)
带快速四网测试版本:
bash <(curl -Lso- https://dl.233.mba/d/sh/speedtest.sh)
bash <(curl -Lso- https://git.io/J1SEh)
测试 25 端口是否开放
telnet smtp.aol.com 25
测试 IPv4 优先还是 IPv6 优先
curl ip.p3terx.com
流媒体测试
全媒体测试
bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)
奈飞测试
wget -O nf https://github.com/sjlleo/netflix-verify/releases/download/2.5/nf_2.5_linux_amd64 && chmod +x nf && clear && ./nf
#第一个
bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)
# 第二个
bash <(curl -sSL "https://github.com/CoiaPrant/MediaUnlock_Test/raw/main/check.sh")
之后进入脚本快捷方式为 bash multi.sh
2023-0525 检测是否可以访问 ChatGPT 脚本来源
bash <(curl -Ls https://raw.githubusercontent.com/missuo/OpenAI-Checker/main/openai.sh)
2023-4-29 修改检测是否可以访问 ChatGPT 脚本
bash <(curl -Ls https://ourl.co/oaic)
bash <(curl -Ls https://cdn.jsdelivr.net/gh/missuo/OpenAI-Checker/openai.sh)
服务器时间
CentOS 同步时间
yum -y install ntpdate
timedatectl set-timezone Asia/Shanghai
ntpdate ntp1.aliyun.com
BBR
添加 warp
wget -N --no-check-certificate https://cdn.jsdelivr.net/gh/YG-tsj/CFWarp-Pro/multi.sh && chmod +x multi.sh && ./multi.sh
CentOS 7 BBR
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
添加 SWAP
wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh
一键开启 BBR
注意:需要 Linux Kernel 内核升级到 4.9 及以上版本可以实现 BBR 加速
uname -srm
一键开启 BBR,适用于较新的 Debian、Ubuntu
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
TCP 窗口调优
wget http://sh.nekoneko.cloud/tools.sh -O tools.sh && bash tools.sh
添加 warp
wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh [option] [lisence/url/token]
25 端口开放测试
telnet smtp.aol.com 25
输出结果:
Linux 3.10.0-957.12.2.el7.x86_64 x86_64
3 - 内核版本.
10 - 主修订版本.
0-957 - 次要修订版本.
12 - 补丁版本.
Docker 相关
更新、安装必备软件
apt-get update && apt-get install -y wget vim
海外服务器
非大陆 Docker 安装
wget -qO- get.docker.com | bash
卸载 Docker
sudo apt-get purge docker-ce docker-ce-cli containerd.io
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
非大陆 Docker-compose 安装
其实现在安装了 docker,默认就会安装新版的 docker compose,运行命令为:
docker compose
,相比旧版docker-compose
,少了-
, 安装完 docker 之后可以在命令行输入docker compose --version
查看 docker compose 的版本
旧版 docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
旧版的命令为:docker-compose up -d
sudo chmod +x /usr/local/bin/docker-compose
查看版本
docker-compose --version
大陆服务器
国内机安装 docker(2024 年 8 月 6 日更新如果失效请留言)
大陆服务器安装 docker 请见:【2024 最新】国内的服务器安装并配置 Docker(以树莓派 4B 为例子)
也可以试试这个:
curl -fsSL https://bash.foreverlink.love/dockerinstall.sh | bash -s docker --mirror Aliyun
卸载 docker
sudo apt-get remove docker docker-engine
rm -fr /var/lib/docker/
防火墙
CentOS 关闭防火墙
systemctl start supervisord
systemctl disable firewalld
systemctl stop firewalld
📦 容器生命周期管理
🚦 容器启停操作
复制代码# 优雅停止容器
docker stop <Name/ID>
# 强制终止容器
docker kill <Name/ID>
# 重启容器(保留配置)
docker restart <Name/ID>
🧹 容器清理技巧
复制代码# 停止所有运行中的容器
docker stop $(docker ps -aq)
# 删除所有容器(危险!)
docker rm $(docker ps -aq)
# 安全清理已停止的容器
docker container prune
⚠️ 注意:执行批量删除前建议备份重要数据
🖼️ 镜像管理大全
🔍 镜像查询与删除
复制代码# 列出所有镜像(含中间层)
docker images -a
# 删除指定镜像
docker rmi <image_id>
# 强制删除所有镜像(慎用!)
docker rmi -f $(docker images -q)
🧽 镜像空间优化
复制代码# 清理悬空镜像
docker image prune
# 删除未使用镜像(含tag)
docker image prune -a
💡 小技巧:定期执行可节省 30%+ 存储空间
📁 文件操作秘籍
🔄 宿主机与容器文件交互
复制代码# 宿主机 → 容器
docker cp /host/path/file.txt <容器名>:/container/path/
# 容器 → 宿主机
docker cp <容器名>:/container/path/file.txt /host/path/
🛠️ 容器调试实战案例
🔧 进入容器修改配置
复制代码# 以交互模式进入容器
docker exec -it <容器ID> /bin/bash
# 更新软件源并安装vim
apt-get update && apt-get install vim -y
# 编辑配置文件
vi /path/to/config.conf
# 安全退出容器
Ctrl+P → Ctrl+Q
❌ 常见错误解决
复制代码# 出现"command not found"时:
docker exec -it <容器ID> sh # 尝试使用sh替代bash
# 修改配置后重启服务
docker exec <容器ID> service nginx reload
📊 命令速查表(带表情分类)
💡 建议与最佳实践
批量操作前:始终先执行 docker ps -a
确认操作对象
文件编辑:推荐使用 volume
挂载替代容器内直接修改
镜像管理:使用 tag
规范版本控制(如 v1.0, latest)
安全防护:定期扫描镜像漏洞:docker scan <image_name>
立即行动:
💻 打开终端尝试 3 个新学到的命令
📚 收藏本文作为 Docker 速查手册
🔄 分享给你的进步!
宝塔相关
宝塔去除登陆 ( 已经失效,解决方法见:https://blog.laoda.de/archives/bt-to-aapanel)
sed -i "s|if (bind_user == 'True') {|if (bind_user == 'REMOVED') {|g" /www/server/panel/BTPanel/static/js/index.js
rm -rf /www/server/panel/data/bind.pl
宝塔 &aapanel 破解(这个目前也不保证可用了)
# 宝塔&aapanel破解
编辑 /www/server/panel/class/panelplugin.py
找到 softList['list'] = tmpList 这行代码
在下面添加以下代码,注意缩进
softList['pro'] = 1
for soft in softList['list']:
soft['endtime'] = 0
编辑完毕后保存重启面板即可
呆梨相关
XUI
bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/master/install.sh)
脚本来源:https://github.com/FranzKafkaYu/x-ui
mack-a
wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh
一键安装常用环境及软件
docker
bash <(curl -sL 'https://get.docker.com')
Python
curl -O https://raw.githubusercontent.com/lx969788249/lxspacepy/master/pyinstall.sh && chmod +x pyinstall.sh && ./pyinstall.sh
iperf3
apt install iperf3
realm
bash <(curl -L https://raw.githubusercontent.com/zhouh047/realm-oneclick-install/main/realm.sh) -i
gost
wget --no-check-certificate -O gost.sh https://raw.githubusercontent.com/qqrrooty/EZgost/main/gost.sh && chmod +x gost.sh && ./gost.sh
极光面板
bash <(curl -fsSL https://raw.githubusercontent.com/Aurora-Admin-Panel/deploy/main/install.sh)
哪吒监控
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
<script>
window.ShowNetTransfer = true;
window.FixedTopServerName = true;
window.DisableAnimatedMan = true
WARP
wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh
Aria2
wget -N git.io/aria2.sh && chmod +x aria2.sh && ./aria2.sh
宝塔
wget -O install.sh http://v7.hostcli.com/install/install-ubuntu_6.0.sh && sudo bash install.sh
PVE 虚拟化
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)
Argox
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/argox/main/argox.sh)
Debian 11 升级到 Debian 12 教程
第一步:更新当前系统
sudo apt update
sudo apt upgrade -y
sudo apt full-upgrade -y
sudo apt --purge autoremove -y
第二步:修改软件源为 Debian 12(Bookworm)
创建 /etc/apt/sources.list
cat <<EOF | sudo tee /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
EOF
然后统一替换为 Bookworm:
sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
第三步:正式升级系统
sudo apt update
sudo apt upgrade --without-new-pkgs -y
sudo apt full-upgrade -y
第四步:重启并检查系统版本
reboot
重新连接服务器,检查系统版本:
lsb_release -a
应该显示如下:
Description: Debian GNU/Linux 12 (bookworm)
系统升级结束。
附加步骤,插件安装,可能用的到
安装 cron
或 crontab
apt update && apt install cron -y
安装 acme.sh
curl https://get.acme.sh | sh
安装结束。
搭建节点面板命令集合
准备工作:SSH 连接工具 Fianlshell【点击进入】
-
导出快捷命令,文件路径:
\finalshell\config.json
,直接把 config.json 文件替换到新的客户端即可
1、Xray 面板,项目地址:【点击进入】
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)Copy
2、Reality Xray 面板,项目地址:【点击进入】
bash <(curl -Ls https://raw.githubusercontent.com/slobys/x-ui/main/install.sh)Copy
3、伊朗版 Xray 面板,项目地址:【点击进入】
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)Copy
4、BBR 加速,项目地址:【点击进入】
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.shCopy
5、一键安装依赖包
Debian/Ubuntu系统:apt update -y&&apt install -y curl&&apt install -y socat
CentOS系统:yum update -y&&yum install -y curl&&yum install -y socatCopy
6、证书相关
-
安装证书申请程序 acme.sh
curl https://get.acme.sh | sh -s email=my@example.comCopy
-
申请证书
~/.acme.sh/acme.sh --issue -d 你的域名 --standalone Copy
-
安装证书
~/.acme.sh/acme.sh --installcert -d 你的域名 --key-file /root/private.key --fullchain-file /root/cert.crtCopy
7、防火墙相关,更加详细的可看此文章:【点击进入】
放行端口:
firewall-cmd --zone=public --add-port=端口号/tcp --permanent
iptables -A INPUT -p tcp --dport 端口号 -j ACCEPT
ufw allow 端口号
关闭防火墙:
systemctl stop firewalld.service
service iptables stop
ufw disableCopy
8、一键更改 root 用户密码
echo root:naiyou@199 |sudo chpasswd root #红色部分更为自己的密码
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config
sudo rebootCopy
9、一键安装 Docker,此脚本包含了 docker-compose
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.shCopy
10、宝塔面板 aapanel(国际版):【点击进入】
-
Debian 系统一键安装脚本如下,更多系统版本可进入官网查看
wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && bash install.sh aapanelCopy
11、OpenVPN 一键安装脚本
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.shCopy
12、一键安装 Gost V3,项目地址:【点击进入】
bash <(curl -fsSL https://github.com/go-gost/gost/raw/master/install.sh) --installCopy
13、一键安装 Hysteria2
wget -N --no-check-certificate https://raw.githubusercontent.com/flame1ce/hysteria2-install/main/hysteria2-install-main/hy2/hysteria.sh && bash hysteria.shCopy
14、极光面板一键安装脚本,项目地址:【点击进入】
bash <(curl -fsSL https://raw.githubusercontent.com/Aurora-Admin-Panel/deploy/main/install.sh)Copy
15、ServerStatus 服务器管理面板一键脚本:【点击进入】
wget https://raw.githubusercontent.com/cokemine/ServerStatus-Hotaru/master/status.shCopy
16、Trojan Panel 一键安装脚本,项目地址:【点击进入】
source <(curl -L https://github.com/trojanpanel/install-script/raw/main/install_script.sh)
评论