皮皮虾的博客

一个备受大佬们欺负的萌新

[jio本]Ubuntu魔改BBR加锐速真一键

前言

由于现在的一键包都还需要自己安装内核之后重启,再运行脚本之类的,于是夏姬巴乱写了这个jio本,方便自己用,需要的大佬自行修改

PS:目前只支持Ubuntu16.04 x64 并且会删除 /root/目录下的文件,请注意备份

PS:目前只支持Ubuntu16.04 x64 并且会删除 /root/目录下的文件,请注意备份

PS:目前只支持Ubuntu16.04 x64 并且会删除 /root/目录下的文件,请注意备份

 

操作

 

快速运行

wget https://img.ppxwo.com/shell/papapa.bash && bash papapa.bash

 

代码预览

#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

function start-install-bbr(){
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.10/linux-image-4.10.10-041010-lowlatency_4.10.10-041010.201704120813_amd64.deb
dpkg -i linux-image-4.10.10-041010-lowlatency_4.10.10-041010.201704120813_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.10/linux-headers-4.10.10-041010_4.10.10-041010.201704120813_all.deb
dpkg -i linux-headers-4.10.10-041010_4.10.10-041010.201704120813_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.10/linux-headers-4.10.10-041010-lowlatency_4.10.10-041010.201704120813_amd64.deb
dpkg -i linux-headers-4.10.10-041010-lowlatency_4.10.10-041010.201704120813_amd64.deb
kernel1=`dpkg -l|grep linux-image | awk ‘{print $2}’ | grep -v “4.10.10”`
kernel2=`dpkg -l|grep linux-headers | awk ‘{print $2}’ | grep -v “4.10.10”`
apt-get purge -y $kernel1
apt-get purge -y $kernel2
update-grub

cp /etc/rc.local /etc/rc.local.b

echo ‘#!/bin/sh -e

bash /root/bbr.sh
exit 0
‘ > /etc/rc.local

echo ‘
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

apt update
apt install -y build-essential
apt install gcc-4.9 -y
wget -O Makefile https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/Makefile/Makefile-Debian7or8
wget https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/General/Debian/source/kernel-v4.12andbelow/tcp_nanqinlang.c
make && make install
echo -e “\nnet.core.default_qdisc=fq” >> /etc/sysctl.conf
echo -e “net.ipv4.tcp_congestion_control=nanqinlang\c” >> /etc/sysctl.conf
sysctl -w net.ipv4.tcp_congestion_control=nanqinlang
sysctl -p
rm -rf /etc/rc.local
mv /etc/rc.local.b /etc/rc.local
rm -rf /root/*
‘ > /root/bbr.sh
chmod +x /root/bbr.sh
echo “系统即将重启,当root目录下没有文件了即代表已经完成安装”
sleep 3
reboot
}

function start-install-serverspeed(){
apt-get purge -y linux-image-*
apt-get install linux-image-4.4.0-47-generic linux-image-extra-4.4.0-47-generic -y
update-grub

cp /etc/rc.local /etc/rc.local.b
echo ‘#!/bin/sh -e

bash /root/serverspeed.sh
exit 0
‘ > /etc/rc.local

echo ‘
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

wget –no-check-certificate -O appex.sh https://raw.githubusercontent.com/0oVicero0/serverSpeeder_Install/master/appex.sh && chmod +x appex.sh && bash appex.sh install <<EOF

EOF

rm -rf /etc/rc.local
mv /etc/rc.local.b /etc/rc.local
rm -rf /root/*

‘ > /root/serverspeed.sh

chmod +x /root/serverspeed.shserverspeed.sh
echo “系统即将重启,当root目录下没有文件了即代表已经完成安装”
sleep 3
reboot

}

function choose(){
echo “
1.安装南琴大佬的魔改BBR
2.Vicer大佬的开心锐速

echo && stty erase ‘^H’ && read -p “选择安装BBR还是锐速 [1/2] 默认bbr” type
[[ -z ${type} ]] || [[ ${type} == “1” ]] && start-install-bbr
[[ ${type} == “2” ]] && start-install-serverspeed
}

echo “本jio本会删除/root目录下所有文件,请备份重要文件”
echo && stty erase ‘^H’ && read -p “是否继续[y/n] 默认n” go
[[ -z ${go} ]] || [[ ${go} == “n” ]] && exit 0
[[ ${go} == “y” ]] && choose

点赞
  1. 搬瓦工说道:

    朋友 交换链接吗

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Captcha Code