[脚本收集] 常用脚本备份

宝塔面板&AApanel

Debian系统

# 宝塔
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh

# aapanel
wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && bash install.sh

有次无聊看了看文件发现aapanel就是宝塔的换皮,语言换成了英语,所以破解方法一样。

# 宝塔去实名认证
rm -rf /www/server/panel/data/bind.pl

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

softList['pro'] = 1
for soft in softList['list']:
soft['endtime'] = 0

编辑完毕后保存重启面板即可

国内机一键安装docker

curl -sSL https://get.daocloud.io/docker | sh

bbr 加速脚本

1、自行安装Curl、Wget等,代码如下:

  1. yum -y install wget #ContOS 安装 wget
  2. apt-get install wget #Debian Ubuntu 安装 wget
  3. yum -y install curl #ContOS 安装 curl
  4. apt-get install curl #Debian Ubuntu 安装 crul

    四合一 BBR Plus / 原版BBR / 魔改BBR 

    支持环境

    Centos 7, Debian 8/9, Ubuntu 16/18 测试通过, 不支持 OVZ

    wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

    Debian CentOS 开启自带BBR加速

    本脚本只针对 Debian≥9 或是 CentOS≥8 以上的系统,可以开启系统自带BBR加速。

    echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
    echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
    sysctl -p
    lsmod | grep bbr

    网络重装脚本(DD)参数定义及使用

    -firmware                额外的驱动支持
    - d                      Debian系统 后面是系统版本号
    - c                      Centos系统 后面是系统版本号
    - v                      后面写64位 32位
    - a                      不清楚这个干啥的但是每个脚本都带
    --mirror                 后面是镜像源地址
    - p                      后面写自定义密码
    –ip-addr                 ifconfig -a 后获取到的 例:194.87.xxx.xxx
    –ip-gate                 route -n    后获取到的 例   194.87.xxx.xxx
    –ip-mask                 255.255.xxx.xx

    Oracle、Virmach、RackNerd、Ruvds 等大部分 VPS 通用一键 DD 脚本,支持 ARM 及 AMD

    bash (wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 11 -v 64 -a -firmware -p 自定义密码

    国内 VPS 需要更换镜像源,否则速度很慢

    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 自定义密码

    一些国内的镜像站:

    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/'</code></pre>

    DD Windows

    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系统直链 可以去 http://dd.nat.ee 下载 感谢 @nat.ee。

    常用脚本

    一键脚本收录工具箱

    wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh

    一键开启BBR(适用于高版本的 Debian、Ubuntu、CentOS)

    #1、开启系统自带BBR + fq :
    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
    
    #2、一键 BBR 脚本,包括 BBR / BBR PLUS /魔改 BBR 等:
    wget -N --no-check-certificate "https://raw.githubusercontent.com/ylx2016/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
    
    #3、BBR 参数调优
    wget http://sh.nekoneko.cloud/tools.sh -O tools.sh && bash tools.sh

    SuperBench

    wget -qO- git.io/superbench.sh | bash

    LemonBench

    wget -O- https://ilemonra.in/LemonBenchIntl | bash -s full

    Bench.sh

    wget -qO- bench.sh | bash

    三网测速

    bash <(curl -Lso- http://yun.789888.xyz/speedtest.sh)

    流媒体检测

    # 第一个
    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")

    三网回程测试

    # 第一个
    wget https://raw.githubusercontent.com/nanqinlang-script/testrace/master/testrace.sh
    bash testrace.sh
    
    # 第二个
    wget -qO- git.io/besttrace | bash
    
    # 第三个
    curl http://tutu.ovh/bash/returnroute/test.sh | bash

    机器性能测试(yabs)

    curl -sL yabs.sh | bash

    Docker 一键安装

    更新、安装必备软件
    apt-get update &amp;&amp; apt-get install -y wget vim
    
    #国外机:
    curl -sSL https://get.docker.com/ | sh
    
    #国内机:
    curl -sSL https://get.daocloud.io/docker | sh

    Docker 卸载

    sudo apt-get remove docker docker-engine
    rm -fr /var/lib/docker/

    Docker-compose 一键安装

    #国外机:
    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
    sudo chmod +x /usr/local/bin/docker-compose
    
    #国内机**
    curl -L https://get.daocloud.io/docker/compose/releases/download/v2.1.1/docker-compose-uname -s-uname -m /usr/local/bin/docker-compose
    chmod +x /usr/local/bin/docker-compose

    VPS 开放所有端口(适合甲骨文 ARM Ubuntu 系统)

    iptables -P INPUT ACCEPT
    iptables -P FORWARD ACCEPT
    iptables -P OUTPUT ACCEPT
    iptables -F
    apt-get purge netfilter-persistent

    VPS 改成 root 登录(适合甲骨文、谷歌云等)

    sudo -i
    echo root:你的密码@ |sudo chpasswd root
    sudo sed -i 's/^.\*PermitRootLogin.\*/PermitRootLogin yes/g' /etc/ssh/sshd\_config;
    sudo sed -i 's/^.\*PasswordAuthentication.\*/PasswordAuthentication yes/g' /etc/ssh/sshd\_config;
    sudo service sshd restart

      版权声明:
      作者:admin
      链接:http://www.bttme.com/archives/1330.html
      来源:bttme
      文章版权归作者所有,未经允许请勿转载。

      THE END
      分享
      二维码
      < <上一篇
      下一篇>>