User-Profile-Image
hankin
  • 5
  • 首页
  • 分类
    • Windows
    • Web
    • VoIP
    • Virtualization
    • Trading
    • Smart Home
    • SEO
    • Security
    • Python
    • Program
    • PHP
    • OSX
    • OS
    • OpenSource
    • Nginx
    • MySQL
    • Mood
    • Linux
    • Life
    • Injection
    • Hosting
    • Finance
    • Exploits
    • CDN
  • 页面
    • About
  • 友链
    • 维酷科技
    • Tesra超算网络
Help?

Please contact us on our email for need any support

Support
  • 首页
    首页   ›   OS   ›   Linux   ›   正文
Linux

CentOS7升级内核开启BBR加速网络

2022-01-09 05:07:51
2620  1 0

现在最新的CentOS8默认内核已经集成BBR,而CentOS7默认内核还需要先升级才能开启BBR加速。

1、升级最新内核

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

完成后查看是否升级成功

rpm -qa | grep kernel

kernel-3.10.0-1160.45.1.el7.x86_64
kernel-tools-3.10.0-1160.45.1.el7.x86_64
kernel-tools-libs-3.10.0-1160.45.1.el7.x86_64
kernel-ml-5.15.13-1.el7.elrepo.x86_64

2、修改系统启动引导

输入以下命令查看当前引导

egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'

CentOS Linux (5.15.13-1.el7.elrepo.x86_64) 7 (Core)
CentOS Linux (3.10.0-1160.45.1.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-754f8a1ad2654504b10cacfb2e9d5eb0) 7 (Core)

可以看到最新内核在第一个位置,所以设置引导项为0

grub2-set-default 0

腾讯轻量云需要多一个命令

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-editenv list #检查启动项修改结果

3、开启BBR

echo 'net.core.default_qdisc=fq' | tee -a /etc/sysctl.conf
echo 'net.ipv4.tcp_congestion_control=bbr' | tee -a /etc/sysctl.conf

最后reboot系统完成开启BBR

重启完成检查BBR是否成功开启

lsmod | grep bbr

tcp_bbr                20480  15

有输出类似结果代表成功开启BBR

评论 (1)

Click here to cancel reply.

欢迎您 游客  

  • 啥也不说了,希望疫情早点结束吧!

    3年前
    回复
ProdigYu
180文章 77评论 4点赞 575265浏览
随机文章
Linux下Screen命令详解
15年前
免费开源的WHMCS支付宝插件
15年前
编译安装go语言运行环境
5年前
SSH修改调整美国Linux VPS 时间和时区
13年前
lnmp一键环境更换MySQL数据库存放目录
9年前
Tags
Apache CentOS CMD DDOS Debian DNS Docker FastCGI Google IIS IP iptables Linux Mac MySQL Nginx Opensource PHP Python Skill SSH Ubuntu Vim VMware VPN web.py Windows 删除 命令 命令提示符 安装 开源 技巧 插件 漏洞 百度 系统 组件 终端 缓存 网络电话 脚本 自建 详解 错误
Meta
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Copyright © 2025
主页
页面
  • About
博主
ProdigYu 管理员
Something about myself
180 文章 77 评论 575265 浏览
测试
测试