【备份】小鸡常用脚本备份

VPS  ·  2023-10-26

Linux工具箱@科技Lion

curl -sS -O https://raw.githubusercontent.com/kejilion/sh/main/kejilion.sh && chmod +x kejilion.sh && ./kejilion.sh

DD脚本

  • 萌咖DD脚本(可DD Ubuntu/Debian,默认密码:MoeClub.org)

    bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p 密码 -port 端口 -a -firmware
  • nodeseeek DD脚本(默认密码:LeitboGi0ro

    ##### 更新系统并安装wget #####
    # CentOS:dnf install wget -y
    # AlpineLinux:apk update && apk install wget bash && sed -i 's/root:\/bin\/ash/root:\/bin\/bash/g' /etc/passwd
    apt update install wget -y 
    
    ##### 下载DD脚本 #####
    wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
    
    ##### 安装Debian #####
    bash InstallNET.sh -debian #可选9-12
    
    ##### 安装Ubuntu #####
    bash InstallNET.sh -ubuntu #可选20.04/22.04
    
    ##### 安装Kali rolling #####
    bash InstallNET.sh -kali
    
    ##### 安装Fedora #####
    bash InstallNET.sh -fedora #可选37/38
    
    ##### 安装AlmaLinux #####
    bash InstallNET.sh -almalinux #可选8/9
    
    ##### 安装CentOS #####
    bash InstallNET.sh -centos #可选7-9
    
    ##### 安装Rockylinux #####
    bash InstallNET.sh -rocky #可选8/9
    
    ##### 安装Windows #####
    bash InstallNET.sh -windows #支持 Windows 10 Enterprise LTSC, Windows 11 Pro for Workstation 22H2, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019, Windows Server 2022,重装时输入对应系统的数字版本号即可,如果能通过VNC登录系统,可自动进行 IPv4 静态配置和自动扩展系统盘分区
  • 快速DD Debian12系统(支持Oracle IPV6)

    # 下载脚本
    curl -fLO https://raw.githubusercontent.com/bohanyang/debi/master/debi.sh && chmod a+rx debi.sh
    
    # 运行脚本
    sudo ./debi.sh --cdn --network-console --ethx --bbr --user root --password <新系统用户密码>
    
    # 安装后重启
    sudo shutdown -r now
    –bbr 开启 BBR
    –ethx 网卡名称使用传统形式,如 eth0 而不是 ens3
    –cloud-kernel 安装占用空间较小的 cloud 内核,但可能会导致 UEFI 启动的机器(如 Oracle、Azure 及 Hyper-V、Google Cloud 等)VNC 黑屏。BIOS 启动的普通 VPS 则没有此问题。
    默认时区为 UTC,添加 –timezone Asia/Shanghai 可使用中国时区。
    默认使用 Debian 官方 CDN 镜像源(deb.debian.org),添加 –china 可使用阿里云镜像源。

安装宝塔面板 7.7.0

  • 安装

    curl -sSO https://raw.githubusercontent.com/8838/btpanel-v7.7.0/main/install/install_panel.sh && bash install_panel.sh
  • 转为开心版

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

BBR & 优化脚本

  • 开启原版BBR(建议Linux内核 ≥ 5.0)

    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
  • BBR优化脚本

    bash <(curl -Ls https://github.com/lanziii/bbr-/releases/download/123/tools.sh)

小鸡测评脚本

融合怪测试脚本

bash <(wget -qO- bash.spiritlhl.net/ecs)

流媒体测试脚本

bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)

GB5测试脚本

bash <(curl -sL bash.icu/gb5)

测速脚本

bash <(curl -sL bash.icu/speedtest)

三网仅显示回程线路脚本

wget -qO- git.io/besttrace | bash

一键更换SSH端口脚本(默认2222)

sed -i 's/#Port\ 22/Port\ 2222/' /etc/ssh/sshd_config && systemctl reload ssh

剑皇脚本

wget https://github.com/maintell/webBenchmark/releases/download/0.6/webBenchmark_linux_x64
chmod +x webBenchmark_linux_x64
./webBenchmark_linux_x64 -c 32 -s https://target.url

Docker安装与卸载

  • Docker安装

    curl -sSL https://get.docker.com/ | sh
  • Docker卸载

    sudo apt-get remove docker docker-engine -y
    sudo apt-get autoremove -y
    rm -fr /var/lib/docker/
 
评论
猫猫博客. All Rights Reserved. Theme Jasmine by Kent Liao.