Linux 通用脚本

发布于 2022-12-07  1145 次阅读


vps性能测试脚本

Bench.sh脚本,服务器基本信息与IO读写,国内三网下载测试 延迟脚本
wget -qO- bench.sh | bash
superbench脚本,服务器基本信息与IO读写,国内三网下载测试 延迟脚本
wget -qO- git.io/superbench.sh | bash

三网测速

bash <(curl -Lso- https://git.io/superspeed_uxh)
bash <(curl -Lso- https://git.io/J1SEh)
wget -O jcnf.sh https://raw.githubusercontent.com/Netflixxp/jcnfbesttrace/main/jcnf.sh
bash jcnf.sh

流媒体通用测试

全媒体测试
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")

常用脚本

一键开启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

宝塔面板7.7.0

该版本防火墙可能会有bug
重要资料备份 谨慎使用

  项目地址
https://github.com/8838/btpanel-v7.7.0
  安装指令
curl -sSO https://raw.githubusercontent.com/8838/btpanel-v7.7.0/main/install/install_panel.sh && bash install_panel.sh
  屏蔽手机号
sed -i "s|bind_user == 'True'|bind_user == 'XXXX'|" /www/server/panel/BTPanel/static/js/index.js
  删除强制绑定手机js文件
rm -f /www/server/panel/data/bind.pl
  手动解锁宝塔所有付费插件为永不过期
文件路径:/www/server/panel/data/plugin.json
搜索字符串:"endtime": -1全部替换为"endtime": 999999999999
  给plugin.json文件上锁防止自动修复为免费版
chattr +i /www/server/panel/data/plugin.json

宝塔 Linux 面板 7.9.5 开心版

不保证有无后门

宝塔 Linux 面板 7.9.5 开心版 - 2022年11月24日

Centos安装命令(默认安装是7.8.0 直接在线升级7.9.5):
yum install -y wget && wget -O install.sh http://io.bt.sy/install/install_6.0.sh && sh install.sh

试验性Centos/Ubuntu/Debian安装命令 独立运行环境(py3.7) 可能存在少量兼容性问题 不断优化中
curl -sSO http://io.bt.sy/install/install_panel.sh && bash install_panel.sh

Ubuntu Deepin安装命令:
wget -O install.sh http://io.bt.sy/install/install-ubuntu_6.0.sh && sudo bash install.sh

Debian安装命令:
wget -O install.sh http://io.bt.sy/install/install-ubuntu_6.0.sh && bash install.sh

Fedora安装命令:
wget -O install.sh http://io.bt.sy/install/install_6.0.sh && bash install.sh

Linux面板 7.9.5 升级企业版命令 1(7.9.5 官方版 / 7.7.0 开心版 可以执行这个升级到 7.9.5 开心版):
curl https://io.bt.sy/install/update_panel.sh|bash

讲解:升级企业版命令 1  与  升级企业版命令 2 二选一 都可以升级最新版!

Linux面板 7.9.5 升级企业版命令 2(7.9.5 官方版 / 7.7.0 开心版 可以执行这个升级到 7.9.5 开心版):
curl http://io.bt.sy/install/update6.sh|bash

镜像站地址

官方给出的地址列表: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 'http://mirrors.tencent.com/debian/'
--mirror 'http://mirrors.cloud.tencent.com/debian/'
腾讯源内网(dd完毕后可以修改 走内网速度更快)
http://mirrors.tencentyun.com/
阿里源
--mirror 'https://mirrors.aliyun.com/debian/'
华为源
--mirror 'https://mirrors.huaweicloud.com/debian/'

DD windows 脚本

DD前 请备份数据

https://git.beta.gs/
安装重装系统的前提组件:
Debian/Ubuntu:
apt-get install -y xz-utils openssl gawk file wget screen && screen -S os
RedHat/CentOS:
yum install -y xz openssl gawk file glibc-common wget screen && screen -S os
如果出现异常,请刷新Mirrors缓存或更换镜像源。
RedHat/CentOS:
yum makecache && yum update -y
Debian/Ubuntu:
apt update -y && apt dist-upgrade -y
使用:
wget --no-check-certificate -O NewReinstall.sh https://git.io/newbetags && chmod a+x NewReinstall.sh && bash NewReinstall.sh
如为CN主机(部分主机商已不能使用),可能出现报错或不能下载脚本的问题,可执行以下命令开始安装.
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合一系统密码
CentOS 7.7 (已关闭防火墙及SELinux,默认密码Pwd@CentOS)
CentOS 7 (默认密码cxthhhhh.com)
CentOS 7 (支持ARM64、UEFI,默认密码cxthhhhh.com)
CentOS 8 (默认密码cxthhhhh.com)
Rocky 8 (默认密码cxthhhhh.com)
Rocky 8 (支持UEFI,默认密码cxthhhhh.com)
Rocky 8 (支持ARM64、UEFI,默认密码cxthhhhh.com)
CentOS 9 (默认密码cxthhhhh.com)
CentOS 6 (官方源原版,默认密码Minijer.com)
Debian 11 (官方源原版,默认密码Minijer.com)
Debian 10 (官方源原版,默认密码Minijer.com)
Debian 9 (官方源原版,默认密码Minijer.com)
Debian 8 (官方源原版,默认密码Minijer.com)
Ubuntu 20.04 (官方源原版,默认密码Minijer.com)
Ubuntu 18.04 (官方源原版,默认密码Minijer.com)
Ubuntu 16.04 (官方源原版,默认密码Minijer.com)
Windows Server 2022 (默认密码cxthhhhh.com)
Windows Server 2022 (支持UEFI,默认密码cxthhhhh.com)
Windows Server 2019 (默认密码cxthhhhh.com)
Windows Server 2016 (默认密码cxthhhhh.com)
Windows Server 2012 (默认密码cxthhhhh.com)
Windows Server 2008 (默认密码cxthhhhh.com)
Windows Server 2003 (默认密码cxthhhhh.com)
Windows 10 LTSC (默认密码Teddysun.com)
Windows 10 LTSC (支持UEFI,默认密码Teddysun.com)
Windows 7 x86 Lite (默认密码nat.ee)
Windows 7 x86 Lite (阿里云专用,默认密码nat.ee)
Windows 7 x64 Lite (默认密码nat.ee)
Windows 7 x64 Lite (支持UEFI,默认密码nat.ee)
Windows 10 LTSC Lite (默认密码nat.ee)
Windows 10 LTSC Lite (阿里云专用,默认密码nat.ee)
Windows 10 LTSC Lite (支持UEFI,默认密码nat.ee)
Windows Server 2003 Lite (C盘默认10G,默认密码WinSrv2003x86-Chinese)
Windows Server 2008 Lite (默认密码nat.ee)
Windows Server 2008 Lite (支持UEFI,默认密码nat.ee)
Windows Server 2012 Lite (默认密码nat.ee)
Windows Server 2012 Lite (支持UEFI,默认密码nat.ee)
Windows Server 2016 Lite (默认密码nat.ee)
Windows Server 2016 Lite (支持UEFI,默认密码nat.ee)
Windows Server 2022 Lite (默认密码nat.ee)
Windows Server 2022 Lite (支持UEFI,默认密码nat.ee)
最后更新于 2022-12-07