Giter Club home page Giter Club logo

cbbr's Introduction

CBBR

这是一个方便开启魔改bbr&bbr的脚本。 执行两步后最后输出Finish!提示,则成功。
已更新新的推荐方式 需要锐速的内核更换,请移步https://github.com/xratzh/XRSK

暂停更新&推荐:

推荐debian和ubuntu用户使用

更方便的方式,基于https://xanmod.org 升级最新内核,开启bbr即可:

  • 安装最新的内核并重启:
echo 'deb http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list
wget -qO - https://dl.xanmod.org/gpg.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/xanmod-kernel.gpg add -
sudo apt update && sudo apt install linux-xanmod -y
update-grub && update-grub2 && reboot
  • 开启BBR
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

有输出既是开启了。


Debian8、9/Ubuntu14、16(64位)开启魔改BBR

  • Ubuntu14.04需要提前:
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get -y install g++-4.9
  • Debian9需要提前:
wget --no-check-certificate -O libssl.deb https://raw.githubusercontent.com/xratzh/CBBR/master/debkernel/libssl1.0.0_1.0.2-1_amd64.deb
dpkg -i libssl.deb

第一步:

apt-get install -y wget && wget --no-check-certificate -O D1.sh https://raw.githubusercontent.com/xratzh/CBBR/master/D1.sh && bash D1.sh

之后输入Y就会重启

第二步:

wget --no-check-certificate -O D2.sh https://raw.githubusercontent.com/xratzh/CBBR/master/D2.sh && bash D2.sh

Ubuntu18开启魔改BBR

会把内核锁定在4.15
第一步:

apt install -y wget && wget --no-check-certificate -O D3.sh https://raw.githubusercontent.com/xratzh/CBBR/master/D3.sh && bash D3.sh

之后输入Y就会重启

第二步:

wget --no-check-certificate -O D4.sh https://raw.githubusercontent.com/xratzh/CBBR/master/D4.sh && bash D4.sh

CentOS7开启魔改BBR

第一步:

yum install -y wget && wget --no-check-certificate -O C71.sh https://raw.githubusercontent.com/xratzh/CBBR/master/C71.sh && bash C71.sh

之后输入Y就会重启

第二步:

wget --no-check-certificate -O C72.sh https://raw.githubusercontent.com/xratzh/CBBR/master/C72.sh && bash C72.sh

CentOS6开启魔改BBR

第一步:

yum install -y wget && wget --no-check-certificate -O C61.sh https://raw.githubusercontent.com/xratzh/CBBR/master/C61.sh && bash C61.sh

之后输入Y就会重启

第二步:

wget --no-check-certificate -O C62.sh https://raw.githubusercontent.com/xratzh/CBBR/master/C62.sh && bash C62.sh

Tips

  • 存在对于其他内核的删除,只保留4.11.8内核的行为
  • 为什么不能一键,因为Linux内核在4.0后支持不重启更换,但是CentOS和Debian/Ubuntu很多的内核都是4.0-的版本,Debian9和Ubuntu16.04则是4.0+的版本。
  • Xratzh压力测试,发现bbr和魔改bbr都开启时会达到最快(个人验证),本脚本默认两者都开启。
  • 脚本里加入了对内核的锁定,之后update时不会变动内核。内核统一选择4.11.8版本。
  • 由于这个我找到的CentOS/Ubuntu历史内核的镜像站的网速时快时慢,所以自己下载了上传到GitHub,这样能保持一个较为稳定的速度。原来的内核地址仍然在脚本里面,只是被添加注释了,如果你不信任我上传的内核,可以自己取消注释使用镜像站的内核下载方式。  
  • 部分内容借鉴了Vicer大佬Teddysun大佬的脚本,感谢hostloc的yankee大佬和nanqinlang大佬的魔改优化。

cbbr's People

Contributors

xratzh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.