News:这是一个新的Typecho主题,如果使用问题请反馈给我QQ1989473781

CentOS 7安装指定内核 并启动BBR加速

独立账号 2243 0 条

QQ截图20190416152629.png

查看现在运行的内核

uname -r

显示

3.10.0-862.14.4.el7.x86_64

先下载内核
http://mirror.rc.usf.edu/compute_lock/elrepo/kernel/el7/x86_64/RPMS/
下载地址好多, 我是顺便找的一个

wget http://mirror.rc.usf.edu/compute_lock/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-5.1.14-1.el7.elrepo.x86_64.rpm

第一个必须安装
安装:

yum install kernel-ml-5.1.14-1.el7.elrepo.x86_64.rpm -y

查看一下内核启动顺序

awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg

显示如下

CentOS Linux (5.1.14-1.el7.elrepo.x86_64) 7 (Core) CentOS Linux
(3.10.0-862.14.4.el7.x86_64) 7 (Core) CentOS Linux
(3.10.0-693.21.1.el7.x86_64) 7 (Core) CentOS Linux
(3.10.0-693.el7.x86_64) 7 (Core) CentOS Linux
(0-rescue-fd7a7009a3684642a9a8cda0893748d1) 7 (Core)
显示刚刚安装的5.1.14-1.el7.elrepo.x86_64排第一位

修改grub配置文件

vi /etc/default/grub

GRUB_DEFAULT=saved

修改为

GRUB_DEFAULT=0

更新

grub2-mkconfig -o /boot/grub2/grub.cfg

重启CentOS

reboot

查看现在的内核

uname -r

已经变成

5.1.14-1.el7.elrepo.x86_64
再快速开启BBR加速

因为内核是4.9.x或以上, 那么可以直接开启

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

然后使其生效

sysctl -p

查看BBR是否安装成功

sysctl net.core.default_qdisc

如果返回下面的信息

net.core.default_qdisc = fq
再输入

sysctl net.ipv4.tcp_congestion_control

返回

net.ipv4.tcp_congestion_control = bbr

就说明安装成功了.
转发自:https://www.openos.org/post/291/

发表我的评论

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址