全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 29950|回复: 119
打印 上一主题 下一主题

[经验] 【2023脚本收集】常用脚本备份

  [复制链接]
跳转到指定楼层
1#
发表于 2022-11-12 09:00:45 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 hostlocmjj 于 2022-12-21 08:17 编辑

感谢以下大佬收集整理脚本
https://91ai.net/thread-921605-1-1.html
https://blog.laoda.de/archives/useful-script
https://www.wrnxr.cn/163.html

DD网络重装脚本
PS:自定义密码直接 -p 你想要的密码就行!!!
部分机器需要设置网卡,否则可以VNC,但是不能远程SSH
  1. -firmware                额外的驱动支持
  2. -d                        Debian系统 后面是系统版本号
  3. -c                        Centos系统 后面是系统版本号
  4. -v                         后面写64位 32位
  5. -a                        auto,全自动无人值守安装
  6. --mirror                后面是镜像源地址
  7. -p                        后面写自定义密码
  8. –ip-addr                 ifconfig -a 后获取到的 例:194.87.xxx.xxx
  9. –ip-gate                 route -n    后获取到的 例   194.87.xxx.xxx
  10. –ip-mask                 255.255.xxx.xx
复制代码

· 甲骨文、三毛、Vir、RN等大部分VPS通用,三毛、甲骨文 记得去掉 -firmware
  1. bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 11 -v 64 -a -firmware -p 自定义密码
复制代码

  1. bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p 密码 -port 端口 -a -firmware
复制代码

PS:如果你是腾讯云记得卸载组件 否则会导致报错 DD失败
  1. systemctl stop tat_agent
  2. systemctl disable tat_agent
  3. rm -rf /etc/systemd/system/tat_agent.service
  4. rm -fr /usr/local/qcloud

  5. ps -A | grep agent
  6. # 检查看是否还有腾讯云组件
  7. # kill 这个进程
复制代码

· 国内VPS需要更换镜像源否则很慢!我这里使用的华为源,如果你是腾讯云后面可以换成内网源,节省流量,下面有写!
  1. 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 自定义密码
复制代码


镜像站地址
官方给出的地址列表:https://www.debian.org/mirror/list
  1. 一些国内的
  2. ftp.cn.debian.org
  3. mirror.bjtu.edu.cn
  4. mirror.lzu.edu.cn        
  5. mirror.nju.edu.cn        
  6. mirrors.163.com        
  7. mirrors.bfsu.edu.cn        
  8. mirrors.hit.edu.cn        
  9. mirrors.huaweicloud.com        
  10. mirror.sjtu.edu.cn        
  11. mirrors.tuna.tsinghua.edu.cn        
  12. mirrors.ustc.edu.cn        

  13. 使用方法:(大致都是一样的)

  14. 清华源
  15. --mirror 'https://mirrors.ustc.edu.cn/debian/'
  16. 腾讯源
  17. --mirror 'http://mirrors.tencent.com/debian/'
  18. --mirror 'http://mirrors.cloud.tencent.com/debian/'
  19. 腾讯源内网(dd完毕后可以修改 走内网速度更快)
  20. http://mirrors.tencentyun.com/
  21. 阿里源
  22. --mirror 'https://mirrors.aliyun.com/debian/'
  23. 华为源
  24. --mirror 'https://mirrors.huaweicloud.com/debian/'
复制代码

· DD windows
https://git.beta.gs/
  1. 安装重装系统的前提组件:
  2. Debian/Ubuntu:
  3. apt-get install -y xz-utils openssl gawk file wget screen && screen -S os

  4. RedHat/CentOS:
  5. yum install -y xz openssl gawk file glibc-common wget screen && screen -S os

  6. 如果出现异常,请刷新Mirrors缓存或更换镜像源。
  7. RedHat/CentOS:
  8. yum makecache && yum update -y
  9. Debian/Ubuntu:
  10. apt update -y && apt dist-upgrade -y


  11. 使用:
  12. wget --no-check-certificate -O NewReinstall.sh https://git.io/newbetags && chmod a+x NewReinstall.sh && bash NewReinstall.sh

  13. 如为CN主机(部分主机商已不能使用),可能出现报错或不能下载脚本的问题,可执行以下命令开始安装.
  14. 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
复制代码
41合一系统密码:
1、CentOS 7.7 (已关闭防火墙及SELinux,默认密码Pwd@CentOS)
2、CentOS 7 (默认密码cxthhhhh.com)
3、CentOS 7 (支持ARM64、UEFI,默认密码cxthhhhh.com)
4、CentOS 8 (默认密码cxthhhhh.com)
5、Rocky 8 (默认密码cxthhhhh.com)
6、Rocky 8 (支持UEFI,默认密码cxthhhhh.com)
7、Rocky 8 (支持ARM64、UEFI,默认密码cxthhhhh.com)
8、CentOS 9 (默认密码cxthhhhh.com)
9、CentOS 6 (官方源原版,默认密码Minijer.com)
10、Debian 11 (官方源原版,默认密码Minijer.com)
11、Debian 10 (官方源原版,默认密码Minijer.com)
12、Debian 9 (官方源原版,默认密码Minijer.com)
13、Debian 8 (官方源原版,默认密码Minijer.com)
14、Ubuntu 20.04 (官方源原版,默认密码Minijer.com)
15、Ubuntu 18.04 (官方源原版,默认密码Minijer.com)
16、Ubuntu 16.04 (官方源原版,默认密码Minijer.com)
17、Windows Server 2022 (默认密码cxthhhhh.com)
18、Windows Server 2022 (支持UEFI,默认密码cxthhhhh.com)
19、Windows Server 2019 (默认密码cxthhhhh.com)
20、Windows Server 2016 (默认密码cxthhhhh.com)
21、Windows Server 2012 (默认密码cxthhhhh.com)
22、Windows Server 2008 (默认密码cxthhhhh.com)
23、Windows Server 2003 (默认密码cxthhhhh.com)
24、Windows 10 LTSC (默认密码Teddysun.com)
25、Windows 10 LTSC (支持UEFI,默认密码Teddysun.com)
26、Windows 7 x86 Lite (默认密码nat.ee)
27、Windows 7 x86 Lite (阿里云专用,默认密码nat.ee)
28、Windows 7 x64 Lite (默认密码nat.ee)
29、Windows 7 x64 Lite (支持UEFI,默认密码nat.ee)
30、Windows 10 LTSC Lite (默认密码nat.ee)
31、Windows 10 LTSC Lite (阿里云专用,默认密码nat.ee)
32、Windows 10 LTSC Lite (支持UEFI,默认密码nat.ee)
33、Windows Server 2003 Lite (C盘默认10G,默认密码WinSrv2003x86-Chinese)
34、Windows Server 2008 Lite (默认密码nat.ee)
35、Windows Server 2008 Lite (支持UEFI,默认密码nat.ee)
36、Windows Server 2012 Lite (默认密码nat.ee)
37、Windows Server 2012 Lite (支持UEFI,默认密码nat.ee)
38、Windows Server 2016 Lite (默认密码nat.ee)
39、Windows Server 2016 Lite (支持UEFI,默认密码nat.ee)
40、Windows Server 2022 Lite (默认密码nat.ee)
41、Windows Server 2022 Lite (支持UEFI,默认密码nat.ee)
99、自定义镜像


宝塔面板7.7.0

https://github.com/8838/btpanel-v7.7.0

  1. curl -sSO https://raw.githubusercontent.com/8838/btpanel-v7.7.0/main/install/install_panel.sh && bash install_panel.sh

  2. 1,屏蔽手机号
  3. sed -i "s|bind_user == 'True'|bind_user == 'XXXX'|" /www/server/panel/BTPanel/static/js/index.js
  4. 2,删除强制绑定手机js文件
  5. rm -f /www/server/panel/data/bind.pl
  6. 3,手动解锁宝塔所有付费插件为永不过期
  7. 文件路径:/www/server/panel/data/plugin.json
  8. 搜索字符串:"endtime": -1全部替换为"endtime": 999999999999
  9. 4,给plugin.json文件上锁防止自动修复为免费版
  10. chattr +i /www/server/panel/data/plugin.json
复制代码


常用脚本


一键开启BBR(适用于较新的Debian、Ubuntu)
  1. echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
  2. echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
  3. sysctl -p
  4. sysctl net.ipv4.tcp_available_congestion_control
  5. lsmod | grep bbr
复制代码


superbench
  1. wget -qO- git.io/superbench.sh | bash
复制代码


Bench.sh
  1. wget -qO- bench.sh | bash
复制代码


三网测速
  1. bash <(curl -Lso- https://git.io/superspeed_uxh)
复制代码

  1. bash <(curl -Lso- https://git.io/J1SEh)

  2. wget -O jcnf.sh https://raw.githubusercontent.com/Netflixxp/jcnfbesttrace/main/jcnf.sh
  3. bash jcnf.sh
复制代码


yabs 机器跑分
  1. curl -sL yabs.sh | bash


  2. curl -sL yabs.sh | bash -s -- -flags
复制代码
-b此选项强制使用来自repo的预编译二进制文件而不是本地包
-f/-d此选项禁用fio(磁盘性能)测试
-i此选项禁用iperf(网络性能)测试
-g此选项禁用Geekbench(系统性能)测试
-h此选项打印包含用法、检测到的标志和本地包(fio/iperf)状态的帮助消息
-r此选项减少了iperf位置的数量(Online.net/Clouvider LON+NYC),以减少带宽使用
-4此选项将覆盖Geekbench 5性能测试,并运行Geekbench4测试
-9此选项除了运行Geekbench 5测试外,还运行Geekbench 4测试
-j此选项将结果的JSON表示打印到屏幕上
-w<filename>此选项使用提供的文件名将JSON结果写入文件
-s<url>此选项将结果的JSON表示发送到指定的url(请参阅下面的部分)


一键安装docker
国外
  1. curl -sSL https://get.docker.com/ | sh
复制代码

国内
  1. curl -sSL https://get.daocloud.io/docker | sh
复制代码


卸载docker
  1. sudo apt-get remove docker docker-engine
  2. rm -fr /var/lib/docker/
复制代码


流媒体测试
全媒体测试
  1. bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)
复制代码

奈飞测试
  1. wget -O nf https://github.com/sjlleo/netflix-verify/releases/download/2.5/nf_2.5_linux_amd64 && chmod +x nf && clear && ./nf

  2. #第一个
  3. bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)

  4. # 第二个
  5. bash <(curl -sSL "https://github.com/CoiaPrant/MediaUnlock_Test/raw/main/check.sh")
复制代码



Glances:跨平台的系统性能监控利器
  1. curl -L https://bit.ly/glances | bash
  2. wget -O- https://bit.ly/glances | bash
复制代码


还没完 剩下的详见2楼

参考  https://blog.laoda.de/archives/useful-script
  https://www.wrnxr.cn/163.html


已放入本人博客,ip+1     https://archives.vip/6.html
2#
 楼主| 发表于 2022-11-12 09:04:48 | 显示全部楼层
法外狂徒张三 发表于 2022-11-12 09:03
腾讯源内网(dd完毕后可以修改 走内网不费额外流量)
http://mirrors.tencentyun.com/
????

已修改
3#
 楼主| 发表于 2022-11-12 09:06:20 | 显示全部楼层
本帖最后由 hostlocmjj 于 2023-1-20 08:55 编辑

综合工具箱(强烈推荐,集成了很多脚本)
  1. wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh
复制代码


不太常用脚本

杜甫测试
  1. wget -q https://github.com/Aniverse/A/raw/i/a && bash a
复制代码


单线程测试
  1. bash <(curl -Lso- https://bench.im/hyperspeed)
复制代码


直接显示回程线路
  1. curl https://raw.githubusercontent.com/zhucaidan/mtr_trace/main/mtr_trace.sh|bash

  2. # 第一个
  3. wget https://raw.githubusercontent.com/nanqinlang-script/testrace/master/testrace.sh
  4. bash testrace.sh

  5. # 第二个
  6. wget -qO- git.io/besttrace | bash
复制代码


测试25端口是否开放
  1. telnet smtp.aol.com 25
复制代码


测试IPv4优先还是IPv6优先
  1. curl ip.p3terx.com
复制代码


WARP
  1. wget -N --no-check-certificate https://cdn.jsdelivr.net/gh/YG-tsj/CFWarp-Pro/multi.sh && chmod +x multi.sh && ./multi.sh
复制代码


宝塔一键挂载硬盘脚本
  1. Centos系统请使用以下命令:
  2. yum install wget -y && wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh

  3. Ubuntu系统请使用以下命令:
  4. wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && sudo bash auto_disk.sh

  5. Debian系统请使用以下命令:
  6. wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh
复制代码


FunctionClub大佬的内存检测脚本
CentOS
  1. yum install wget -y
  2. yum groupinstall "Development Tools" -y
  3. wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp
  4. gcc -l stdc++ memtester.cpp
  5. ./a.out
复制代码

Ubuntu / Debian
  1. apt-get update
  2. apt-get install wget build-essential -y
  3. wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp
  4. gcc -l stdc++ memtester.cpp
  5. ./a.out
复制代码


Aria2一键安装脚本
  1. wget -N git.io/aria2.sh && chmod +x aria2.sh && ./aria2.sh
复制代码


qbittorrent安装 4.3.9
  1. cd /root
  2. wget https://github.com/userdocs/qbittorrent-nox-static/releases/download/release-4.3.9_v1.2.15/x86_64-qbittorrent-nox
  3. chmod +x x86_64-qbittorrent-nox
  4. ./x86_64-qbittorrent-nox
复制代码

输入y 然后ctrl+c退出就行
  1. cat << "EOF" > /etc/systemd/system/qbittorrent.service
  2. [Unit]
  3. Description=qBittorrent Daemon Service
  4. After=network.target

  5. [Service]
  6. LimitNOFILE=512000
  7. User=root
  8. ExecStart=/root/x86_64-qbittorrent-nox

  9. [Install]
  10. WantedBy=multi-user.target
  11. EOF
复制代码
  1. # 更新配置
  2. systemctl daemon-reload
  3. # 启动服务
  4. systemctl start qbittorrent
  5. # 查看状态
  6. systemctl status qbittorrent
复制代码


如需重启/关闭程序
请使用kill命令关闭程序
ps -aux | grep qbittorrent
kill 对应序号
如 kill 11111
再使用进程守护打开即可使用

剑皇脚本
  1. wget https://github.com/maintell/webBenchmark/releases/download/0.6/webBenchmark_linux_x64
  2. chmod +x webBenchmark_linux_x64
  3. ./webBenchmark_linux_x64 -c 32 -s https://target.url
复制代码


swap添加/删除脚本
  1. wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh
复制代码


侵权、未声明脚本属于谁的
都可以联系我修改tg@hostlocc
再次感谢各位大佬们的脚本
4#
 楼主| 发表于 2022-11-12 11:03:38 | 显示全部楼层

谢谢给你置顶了
5#
 楼主| 发表于 2022-11-12 11:06:56 | 显示全部楼层
会呼吸的痛 发表于 2022-11-12 11:04
大佬您直接修改帖子内容就好,放方便大家看

已改
6#
 楼主| 发表于 2022-11-12 11:13:06 | 显示全部楼层

v2的不太敢发
7#
 楼主| 发表于 2022-11-12 11:52:42 | 显示全部楼层
蛋饼 发表于 2022-11-12 11:30
感谢感谢大佬,copy到博客备份。

当然可以啦,记得保留原帖地址
8#
 楼主| 发表于 2022-11-13 15:42:02 | 显示全部楼层
烟火 发表于 2022-11-13 10:47
-a                        不清楚这个干啥的但是每个脚本都带

已修改
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-7 11:52 , Processed in 0.073693 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表