uname -r //查看当前内核版本
2.6.32-642.15.1.el6.x86_64
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org //安装elrepo源的签名
rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm //安装RHEL7或CentOS7的elrepo源
rpm -Uvh https://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm //安装RHEL6或CentOS6的elrepo源(二选一即可)
yum yum-plugin-fastestmirror //如果出错则需要安装yum-plugin-fastestmirror
yum --enablerepo=elrepo-kernel install kernel-ml -y //安装elrepo源的内核
ls -l /boot //显示机器已经安装的内核
RHEL 6 修改:
/boot/grub/menu.lst
default 设置为0。启动顺序从上往下为0、1。
如果是RHEL7.2或CentOS 7.2版,则需要使用命令修改grub的配置来实现启动内核的修改:
cat /boot/grub2/grub.cfg |grep menuentry //显示当前启动项
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
menuentry_id_option=""
export menuentry_id_option
menuentry 'Red Hat Enterprise Linux Server (4.10.9-1.el7.elrepo.x86_64) 7.3 (Maipo)'
menuentry 'Red Hat Enterprise Linux Server (3.10.0-514.10.2.el7.x86_64) 7.3 (Maipo)'
menuentry 'Red Hat Enterprise Linux Server (3.10.0-514.el7.x86_64) 7.3 (Maipo)'
menuentry 'Red Hat Enterprise Linux Server (0-rescue-be7a44b4b98e404a8cdcd062c4733c10) 7.3 (Maipo)'
grub2-set-default "Red Hat Enterprise Linux Server (4.10.9-1.el7.elrepo.x86_64) 7.3 (Maipo)" //设置新内核为启动内核
grub2-editenv list //查看默认启动内核
saved_entry=Red Hat Enterprise Linux Server (4.10.9-1.el7.elrepo.x86_64) 7.3 (Maipo)
重新启动一下系统,用uname -r核对内核是否正确。正确的话,执行指令开启BBR:
echo "net.core.default_qdisc = fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control = bbr" >> /etc/sysctl.conf
sysctl -p
通过如下指令核对BBR开启是否成功,如下是开启成功的示例:
sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = bbr cubic reno
lsmod | grep bbr
tcp_bbr 16384 3
参考资料:
https://www.daehub.com/archives/5884.html
https://www.williamlong.info/archives/5586.html
如您从本文得到了有价值的信息或帮助,请考虑扫描文末二维码捐赠和鼓励。
如本文对您有用,捐赠和留言 将是对我最好的支持~(捐赠可转为站内积分)
如愿意,请向朋友推荐本站,谢谢。
尊重他人劳动成果。转载请务必附上原文链接,我将感激不尽。
留言