KVM上 centos6/7安装bbr加速外挂

1:首先yum update -y更新到最新CentOS 7.3 1611

yum -y update
cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

2: 安装elrepo内核
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
然后先rpm -qa |grep kernel
先卸载旧的kernel-headers,kernel-tools, kernel-tools-libs,只保留内核,

yum remove kernel-headers kernel-tools kernel-tools-libs
然后yum –enablerepo=elrepo-kernel install kernel-ml
就会安装elrepo正式版4.9内核,跟着再安装kernel-ml-headers kernel-ml-tools kernel-ml-tools-libs,

yum –enablerepo=elrepo-kernel install kernel-ml kernel-ml-headers kernel-ml-tools kernel-ml-tools-libs
然后
awk -F\’ ‘1==”menuentry ” {print2}’ /etc/grub2.cfg
看看内核启动顺序,然后
grub2-set-default 0
把kernel-ml 4.9设为默认,重启

3:跟着vim /etc/sysctl.conf
加两行:
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

sysctl -p生效,就ok了。

这样是肯定不会挂的。

 

centos 6 换4.9内核方法:
rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm

yum –enablerepo=elrepo-kernel install kernel-ml -y

vi /etc/grub.conf     把default=改成0

reboot

uname -r  看看是不是4.9

步骤2可以简化为

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 -y kernel-ml

 

打赏
Bookmark the permalink.
0 0 投票数
文章评分
订阅评论
提醒
guest

1 评论
内联反馈
查看所有评论