四合一bbr脚本
支持的系统:Centos 7, Debian 8/9, Ubuntu 16/18
yum -y install wget #ContOS 安装 wget
apt-get install wget #Debian Ubuntu 安装 wget
yum -y install curl #ContOS 安装 curl
apt-get install curl #Debian Ubuntu 安装 crul
适用环境
- 系统支持:CentOS 6 ,Debian 7 ,Ubuntu 12
- 虚拟技术: KVM、Xen、VMware 等,(OpenVZ 不支持!)
- 内存要求:≥128M
echo -e "\nnet.core.default_qdisc=fq\nnet.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf && sysctl -p
或
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
检查是否开启BBR
sysctl net.ipv4.tcp_congestion_control
如果成功开启,那么会看到以下输出结果
net.ipv4.tcp_congestion_control = bbr
设置服务器时间
timedatectl set-timezone Asia/Hong_Kong