全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 39583|回复: 200

[疑问] 【脚本收集】常用脚本备份

  [复制链接]
发表于 2021-11-22 11:27:18 | 显示全部楼层 |阅读模式
本帖最后由 AaronYYDS 于 2022-1-9 01:29 编辑

网络重装脚本
PS:自定义密码直接 -p 你想要的密码就行!!!
部分机器需要设置网卡,否则可以VNC,但是不能远程SSH
  1. -firmware                额外的驱动支持
  2. -d                        Debian系统 后面是系统版本号
  3. -c                        Centos系统 后面是系统版本号
  4. -v                         后面写64位 32位
  5. -a                        不清楚这个干啥的但是每个脚本都带
  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 自定义密码
复制代码

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
  1. wget --no-check-certificate -qO InstallNET.sh 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh' && bash InstallNET.sh -dd 'http://d.nat.ee/win/lite/win7-ent-sp1-x64-cn/win7-ent-sp1-x64-cn.vhd.gz'
复制代码

后面的链接为windows系统直链 可以去 dd.nat.ee 下载 感谢 @nat.ee  大佬 大佬文章地址 新增LTSC 2021


· 带 WebUI 可查看进度的
  1. https://raw.githubusercontent.com/flyqie/dd-shell/master/Core_Install.sh
复制代码

国内机可使用
  1. https://ghproxy.com/https://raw.githubusercontent.com/flyqie/dd-shell/master/Core_Install.sh
复制代码

感谢 @flyqie  大佬 原帖地址



宝塔面板&AApanel

Debian系统
  1. # 宝塔
  2. wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh

  3. # aapanel
  4. wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && bash install.sh
复制代码


有次无聊看了看文件发现aapanel就是宝塔的换皮,语言换成了英语,所以破解方法一样。
  1. # 宝塔去实名认证
  2. rm -rf /www/server/panel/data/bind.pl

  3. # 宝塔&aapanel破解
  4. 编辑 /www/server/panel/class/panelplugin.py
  5. 找到 softList['list'] = tmpList 这行代码
  6. 在下面添加以下代码,注意缩进

  7. softList['pro'] = 1
  8. for soft in softList['list']:
  9. soft['endtime'] = 0

  10. 修改宝塔标识(企业版ltd、专业版pro)
  11. 编辑 /www/server/panel/data/plugin.json
  12. 搜索 "pro": 把后面的-1 改为0 即可
  13. 编辑完毕后保存重启面板即可
复制代码


常用脚本

一键开启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- http://yun.789888.xyz/speedtest.sh)
复制代码


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

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

  5. # 第三个(和第一个一样)
  6. bash <(curl -L -s check.unlock.media)
复制代码


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

  4. # 第二个
  5. wget -qO- git.io/besttrace | bash

  6. # 第三个
  7. curl http://tutu.ovh/bash/returnroute/test.sh | bash
复制代码


yabs 机器跑分
  1. curl -sL yabs.sh | bash
复制代码


一件安装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/
复制代码

安装docker-compose
国外机
  1. sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  2. sudo chmod +x /usr/local/bin/docker-compose
复制代码

国内机
  1. curl -L https://get.daocloud.io/docker/compose/releases/download/v2.1.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
  2. chmod +x /usr/local/bin/docker-compose
复制代码
发表于 2021-12-9 01:57:15 | 显示全部楼层
支持正义gura
发表于 2021-12-16 13:46:50 | 显示全部楼层
感谢楼主分享~

另外,gura yyds!
发表于 2021-11-22 11:28:54 | 显示全部楼层
支持一下了!
发表于 2021-11-22 11:32:42 | 显示全部楼层
不错  里面也有我常用的
发表于 2021-11-22 11:33:21 | 显示全部楼层
不错 收藏了
发表于 2021-11-22 11:37:20 | 显示全部楼层
不错 收藏一下脚本
发表于 2021-11-22 11:38:48 | 显示全部楼层
谢谢,已收藏
发表于 2021-11-22 11:39:36 | 显示全部楼层
很有用,已收藏
发表于 2021-11-22 11:40:39 | 显示全部楼层

很有用,马上手动采集
发表于 2021-11-22 11:41:18 来自手机 | 显示全部楼层
谢谢分享,已收藏
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-27 00:36 , Processed in 0.094173 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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