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
2516  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点赞 554266浏览
随机文章
CentOS配置VNCServer以及远程桌面连接
12年前
详解CentOS下安装Glances
11年前
Aapanel升级7.0.5后无法申请Let’s Encrypt证书
11个月前
Mac环境下解决SSH超时断开
10年前
iptables查看NAT链命令
5年前
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 评论 554266 浏览
测试
测试