Debian-Ubuntu开启超级暴力版魔改BBR教程
超等暴力版魔改BBR源码由南琴浪大佬供给,详细有多暴力伏笔VPS(vps.fubi.hk)临时没怎地测试,这边只说下装置教程。
装置
Debian/Ubuntu体系,内核版本v4.9.3-v4.12.x。得装置gcc,Makefile默许只支援gcc 6,你能够修正它(比如)gcc-4.9。
1、变换内核并开启BBR
这边手动装置,方式从BBR刚出来时就在博客说过,这边再说一次。内核下载地点:http://kernel.ubuntu.com/~kernel-ppa/mainline/。且魔改BBR必要3个内核linux-image、linux-headers-all、linux-headers-$bit,这边以v4.10.1为例。
内核下载
#64位体系
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001-generic_4.10.1-041001.201702260735_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001_4.10.1-041001.201702260735_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-image-4.10.1-041001-generic_4.10.1-041001.201702260735_amd64.deb
#32位体系
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001-generic_4.10.1-041001.201702260735_i386.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001_4.10.1-041001.201702260735_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-image-4.10.1-041001-generic_4.10.1-041001.201702260735_i386.deb
内核装置,且装置次第不要变,以次image、headers_all、headers,否则会铸错。
dpkg -i linux-image-4.10.1-041001-generic_4.10.1-041001.201702260735_i386.deb
dpkg -i linux-headers-4.10.1-041001_4.10.1-041001.201702260735_all.deb
dpkg -i linux-headers-4.10.1-041001-generic_4.10.1-041001.201702260735_i386.deb
检察内核
dpkg -l|grep linux-image
dpkg -l|grep linux-headers
剔除旧内核
apt-get purge (旧内核称号)
内核花样翻新
update-grub
重启
reboot
保留见效
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
检察内核能否已开启BBR
sysctl net.ipv4.tcp_available_congestion_control
显现以下即启动胜利
# lsmod | grep bbr
tcp_bbr 20480 14
2、装置超等暴力版魔改BBR
装置情况
apt install -y gcc git make
下载暴力魔改BBR源码
git clone https://github.com/nanqinlang/tcp_nanqinlang-test.git
检察/usr/bin文献夹gcc文献。
find /usr/bin/gcc*
此刻能够看到几个文献,找到gcc-5,也能够是6,详细本人看着办。如其没看到gcc-6,则必要编纂Makefile文献。
cd tcp_nanqinlang*
nano Makefile
将modules CC=/usr/bin/gcc-6后头的gcc修正成方才看到的gcc版本文献,如gcc-5。
装置暴力魔改BBR
make
make install