1 查看内核版本
# [root@os]# uname -a
Linux os 3.10.0-1127.13.1.el7.x86_64 x86_64 x86_64 x86_64 GNU/Linux
2 下载安装脚本和运行
# wget -O- http://soft.wellphp.com/scripts/install_bbr_centos.sh | bash
[root@os]# wget -O- http://soft.wellphp.com/scripts/install_bbr_centos.sh | bash
--2019-03-02 12:28:17-- http://soft.wellphp.com/scripts/install_bbr_centos.sh
Resolving soft.wellphp.com (soft.wellphp.com)... 31.193.141.202
Connecting to soft.wellphp.com (soft.wellphp.com)|31.193.141.202|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://soft.wellphp.com/scripts/install_bbr_centos.sh [following]
--2019-03-02 12:28:18-- https://soft.wellphp.com/scripts/install_bbr_centos.sh
Connecting to soft.wellphp.com (soft.wellphp.com)|31.193.141.202|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2106 (2.1K) [application/octet-stream]
Saving to: ‘STDOUT‘
100%[==============================================>] 2,106 --.-K/s in 0s
2019-03-02 12:28:19 (279 MB/s) - written to stdout [2106/2106]
Now I will replace the system kernel to 4.9.13-1...
Start installing
grep: /usr/share/dracut/modules.d/90kernel-modules/installkernel: No such file or directory
Retrieving http://soft.wellphp.com/kernels/x86_64/kernel-ml-4.9.13-1.el7.centos.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:kernel-ml-4.9.13-1.el7.centos ################################# [100%]
Checking if the installtion is ok
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.cat.net
* epel: nrt.edge.kernel.org
* extras: mirrors.cat.net
* updates: mirrors.cat.net
Package 1:grub2-tools-2.02-0.81.el7.centos.x86_64 already installed and latest version
Nothing to do
Installation is completed, now you can reboot the system.
You should check BBR after the rebooting using command:
sysctl -a|grep congestion_control
3 安装成功后确认是否生效
[root@os ~]# uname -a
Linux 4.9.13-1.el7.centos.x86_64 #1 x86_64 x86_64 x86_64 GNU/Linux
sysctl: reading key "net.ipv6.conf.all.stable_secret"
net.ipv4.tcp_allowed_congestion_control = bbr reno
net.ipv4.tcp_available_congestion_control = bbr reno cubic
net.ipv4.tcp_congestion_control = bbr
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
sysctl: reading key "net.ipv6.conf.eth1.stable_secret"
sysctl: reading key "net.ipv6.conf.eth2.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
原文:https://www.cnblogs.com/tamatama/p/13223824.html