BBR 算法須要 Linux 4.9 及以上的內核支持,因此想要使用該方式的須要先升級內核版本。html
在 Cent OS 7 上的 Linux 內核是 3.10, 使用 uname -r
查看內核版本git
[root@iZ2ze83hhomw2zcf15c3qcZ ~]# uname -r 3.10.0-327.22.2.el7.x86_64
安裝 eprl 的源github
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
安裝最新的內核版本,截止目前最新的都到 4.14算法
sudo yum --enablerepo=elrepo-kernel install kernel-ml -y
看一下系統如今全部的內核 rpm -qa | grep kernel
centos
[root@iZ2ze83hhomw2zcf15c3qcZ ~]# rpm -qa | grep kernel kernel-3.10.0-327.el7.x86_64 kernel-3.10.0-327.22.2.el7.x86_64 kernel-tools-libs-3.10.0-327.el7.x86_64 kernel-tools-3.10.0-327.el7.x86_64 kernel-ml-4.14.3-1.el7.elrepo.x86_64 kernel-headers-3.10.0-514.2.2.el7.x86_64
能夠看到最新的內核版本 kernel-ml-4.14.3-1.el7.elrepo.x86_64
已經安裝好了。google
如今來修改 grub2 的啓動項,設置啓動以後選擇最新的內核, sudo egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
.spa
[root@iZ2ze83hhomw2zcf15c3qcZ ~]# sudo egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \' CentOS Linux (4.14.3-1.el7.elrepo.x86_64) 7 (Core) CentOS Linux (3.10.0-327.22.2.el7.x86_64) 7 (Core) CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core) CentOS Linux (0-rescue-7d26c16f128042a684ea474c9e2c240f) 7 (Core)
啓動順序已經修改了,可是爲了以防萬一,咱們仍是設置一下 sudo grub2-set-default 0
,選擇第一個爲默認啓動項。code
最後就能夠重啓機器htm
sudo reboot
再次登陸機器查看內核版本 uname -r
,已是最新版本blog
[root@iZ2ze83hhomw2zcf15c3qcZ ~]# uname -r 4.14.3-1.el7.elrepo.x86_64
直接使用一步安裝腳本
sudo wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh