教程来源:http://www.vmvps.com/speed-up-your-vps-with-installing-bbr-to-centos-7.html
- yum系统更新
yum update
2.查看系统版本
cat /etc/redhat-release
输出如下,则表示已升级成功
CentOS Linux release 7.3.1611 (Core)
3.安装elrepo并升级内核
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-ml -y
正常情况下将输出如下,
Transaction Summary
================================================================================
Install 1 Package
Total download size: 39 M
Installed size: 169 M
Downloading packages:
kernel-ml-4.9.0-1.el7.elrepo.x86_64.rpm | 39 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : kernel-ml-4.9.0-1.el7.elrepo.x86_64 1/1
Verifying : kernel-ml-4.9.0-1.el7.elrepo.x86_64 1/1
Installed:
kernel-ml.x86_64 0:4.9.0-1.el7.elrepo
Complete!
3.更新grub文件并重启(reboot后,ssh会断开,稍等一会儿重新连接)
egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
grub2-set-default 0
reboot
4.开机后查看内核是否已更换为4.9以及以后的版本
uname -r
输出如下内容则表示内核4.13已经启动了
4.13.0-1.el7.elrepo.x86_64
5.开启bbr
vi /etc/sysctl.conf
添加如下内容
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
加载系统参数(正常情况下会输出我们之前加入的内容)
sysctl -p
4.确定bbr已经开启
若sysctl net.ipv4.tcp_available_congestion_control
返回
net.ipv4.tcp_available_congestion_control = bbr cubic reno
则成功
若lsmod | grep bbr
返回形如
tcp_bbr 16384 1
则成功
评论