mirror of https://github.com/helloxz/shell.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
514 B
19 lines
514 B
5 years ago
|
#!/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
|