From 0c4478e4baafc0c1668633f51fe53f88438a563e Mon Sep 17 00:00:00 2001 From: xiaoz Date: Fri, 26 Jul 2019 13:57:33 +0800 Subject: [PATCH] add bbr --- bbr.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 bbr.sh diff --git a/bbr.sh b/bbr.sh new file mode 100644 index 0000000..be7f954 --- /dev/null +++ b/bbr.sh @@ -0,0 +1,19 @@ +#!/bin/bash +########## CentOS 7安装BBR ############### + +yum -y install wget +wget https://www.elrepo.org/RPM-GPG-KEY-elrepo.org +rpm --import RPM-GPG-KEY-elrepo.org +rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm + +#升级最新内核 +yum --enablerepo=elrepo-kernel install kernel-ml -y +#设置最新内核 +grub2-set-default 0 + +#写入配置文件 +echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf +echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf + +#重启服务器 +reboot \ No newline at end of file