- 更新:20230215
更多请移步 晚云文档
⚒ 常用脚本
面板
哪吒探针:一款便携服务器状态监控面板
海外安装下载地址:
1
| curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
|
国内安装下载地址:
1
| curl -L https://jihulab.com/nezha/nezha/-/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
|
1
| curl -fsSL https://cdn.jsdelivr.net/gh/midoks/mdserver-web@latest/scripts/install.sh | bash
|
1
| curl -fsSL https://cdn.jsdelivr.net/gh/midoks/mdserver-web@latest/scripts/update.sh | bash
|
1
| curl -fsSL https://cdn.jsdelivr.net/gh/midoks/mdserver-web@latest/scripts/uninstall.sh | bash
|
主机工具
工具箱
- BlueSkyXN 综合工具箱
https://github.com/BlueSkyXN/SKY-BOX
1
| wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh
|
Misaka Linux Toolbox
wget -N --no-check-certificate https://raw.githubusercontents.com/tpe28/MisakaLinuxToolbox/master/MisakaToolbox.sh && bash MisakaToolbox.sh
1 2 3 4 5 6 7
| ### 挂载硬盘
1. 脚本(来自宝塔)
```shell wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh #默认挂载到 /www
|
脚本(来自oneinstack)
1 2 3
| wget http://mirrors.linuxeye.com/scripts/auto_fdisk.sh chmod +x ./auto_fdisk.sh ./auto_fdisk.sh
|
如果操作过程中遭遇异常退出,再次运行时,可能会提示:The script is already exist, please next time to run this script,这个时候,需要执行:
1
| rm -f /tmp/.auto_fdisk.sh
|
- 脚本
blog.csdn.net
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| #!/bash/sh echo "请输入所挂盘目标地址!(示例:/dev/xxx)" read -p "地址:" o echo "请输入所要挂载的地址!(示例:/xxx)" read -p "地址:" p sleep 3s cd $p >>/dev/null 2>&1 if [ $? -eq 0 ];then echo "挂载地址存在!" else echo "挂载地址已创建!" | sudo mkdir $p fi sleep 2s sudo mkfs.ext4 -F $o >> /dev/null 2>&1 sleep 3s echo " $o $p ext4 defaults 0 0 " | sudo tee -a /etc/fstab && echo " $p " |sudo tee 1.txt sleep 3s sudo mount -a b=`sed 's#/# #g' 1.txt` a=`df -h|grep /dev/sdb|awk '{print $6}'|sed 's#/# #g'` if [ $a = $b ];then echo " $p 挂载成功! " else echo " $p 挂载失败! " fi sleep 2s
|
开启BBR
1 2 3 4 5
| wget https://down.907777.xyz/Script/vps/install_kernel.sh && chmod +x ./install_kernel.sh && ./install_kernel.sh
wget --no-check-certificate https://raw.githubusercontent.com/jinwyp/one_click_script/master/install_kernel.sh && chmod +x ./install_kernel.sh && ./install_kernel.sh
bash <(curl -Lso- https://git.io/kernel.sh)
|
- (推荐)
1
| wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
|
1
| wget -O tcpx.sh "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
|
流媒体测试
1
| bash <(curl -L -s https://git.io/JRw8R)
|
VPS 测试
- yabs
1
| wget -qO- yabs.sh | bash
|
- bench.sh
1
| wget -qO- bench.sh | bash
|
重装系统
- 萌咖大佬
甲骨文、三毛、Vir、RN 等大部分 VPS 通用,三毛、甲骨文 记得去掉 -firmware
1 2 3
| bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p Abc123 -port 22 -a
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -u 20.04 -p Abc123. -port 29960 -a
|
参数说明 - 42行
1
| bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p 密码 -port 端口 -a -firmware
|
Q:如果出现无法安装Docker报错E: Malformed entry 1 in list file /etc/apt/sources.list.d/docker.list (Component),执行rm /etc/apt/sources.list.d/docker.list即可。
- beta.gs
一键 DD 脚本,支持性好,更智能更全面,支持国内外各种 VPS 重装,特别是对国内各种访问国外资源慢的 VPS 安装有奇效。
安装重装系统的前提组件:
Debian/Ubuntu:
1
| apt-get install -y xz-utils openssl gawk file wget screen && screen -S os
|
RedHat/CentOS:
1
| yum install -y xz openssl gawk file glibc-common wget screen && screen -S os
|
使用:
1
| wget --no-check-certificate -O NewReinstall.sh https://git.io/newbetags && chmod a+x NewReinstall.sh && bash NewReinstall.sh
|
如为 CN 主机 (部分主机商已不能使用),可能出现报错或不能下载脚本的问题,可执行以下命令开始安装.
1
| wget --no-check-certificate -O NewReinstall.sh https://cdn.jsdelivr.net/gh/fcurrk/reinstall@master/NewReinstall.sh && chmod a+x NewReinstall.sh && bash NewReinstall.sh
|
点击使用旧版脚本
- leitbogioro
1
| wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh | bash
|
参数详情:
-debian 9/10/11 : Debian 9+
-centos 7/8/9-stream: CentOS 7+
-almalinux/alma 8/9: AlmaLinux 8+
-rockylinux/rocky 8/9: RockyLinux 8+
-fedora 34/35/36/37: Fedora 34+
-ubuntu 16.04/18.04/20.04: Ubuntu 16.0420.04 -mirror “有效的源链接” -port “165535”
-pwd ‘自定义密码,不可太复杂,不推荐带特殊符号,默认:LeitboGi0ro’
--network “dhcp/auto or static/manual” 动态或静态网络,可选,可不添加,脚本自动识别
带两个横杠的参数应该放在脚本运行最后面
其他
Aria2
1
| wget -N git.io/aria2.sh && chmod +x aria2.sh && ./aria2.sh
|
CCAA
一键安装Aria2 + AriaNg + FileBrowse
1
| bash <(curl -Lsk https://raw.githubusercontent.com/helloxz/ccaa/master/ccaa.sh)
|
Node.js一键安装
1 2
| curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt-get install -y nodejs
|
安装不同版本的Node.js,替换setup_14.x为想要的setup_16.x即可