第一部分:OPENVZ平台
一、OpenVZ 平台 Google BBR(魔改) 一键安装脚本
来源:扩软
安装:
wget https://raw.githubusercontent.com/kuoruan/shell-scripts/master/ovz-bbr/ovz-bbr-installer.sh chmod +x ovz-bbr-installer.sh ./ovz-bbr-installer.sh
123 | wget https://raw.githubusercontent.com/kuoruan/shell-scripts/master/ovz-bbr/ovz-bbr-installer.shchmod +x ovz-bbr-installer.sh./ovz-bbr-installer.sh |
---|
卸载:./ovz-bbr-installer.sh uninstall
修改端口配置:vi /usr/local/haproxy-lkl/etc/port-rules 。在文件里添加需要加速的端口,每行一条,可以配置单个端口或者端口范围,以 # 开头的行将被忽略。 例如:8800 或者 8800-8810 配置完成之后,只需要重启 haproxy-lkl 即可。使用 systemctl 或者 service 命令来启动、停止和重启 HAporxy-lkl:
systemctl {start|stop|restart} haproxy-lkl
或
service haproxy-lkl {start|stop|restart}
二、OpenVZ平台魔改BBR一键脚本之Rinetd方式
来源:南琴浪 GITHUB项目地址
优点:Rinetd就是另外一种lkl bbr,好处是不需要开启TUN/TAP,对于后台没有或者找不到这个模块的,刚好可以用一下。
缺点:不支持IP段加速,每个要加速的端口都需要单独配置。
更新: 2018-03-24 新增 多网卡 适配
Debian or Ubuntu
单网卡(单 IP) 服务器:
wget https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/Rinetd/bash/tcp_nanqinlang-rinetd-debian+ubuntu.sh bash tcp_nanqinlang-rinetd-debian+ubuntu.sh
12 | wget https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/Rinetd/bash/tcp_nanqinlang-rinetd-debian+ubuntu.shbash tcp_nanqinlang-rinetd-debian+ubuntu.sh |
---|
多网卡(多 IP) 服务器,会为所有网卡(所有 IP)提供加速:
wget https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/Rinetd/bash/tcp_nanqinlang-rinetd-debian+ubuntu-multiNIC.sh bash tcp_nanqinlang-rinetd-debian+ubuntu-multiNIC.sh
12 | wget https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/Rinetd/bash/tcp_nanqinlang-rinetd-debian+ubuntu-multiNIC.shbash tcp_nanqinlang-rinetd-debian+ubuntu-multiNIC.sh |
---|
CentOS 7
# 单网卡 wget https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/Rinetd/bash/tcp_nanqinlang-rinetd-centos.sh bash tcp_nanqinlang-rinetd-centos.sh # 多网卡 wget https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/Rinetd/bash/tcp_nanqinlang-rinetd-centos-multiNIC.sh bash tcp_nanqinlang-rinetd-centos-multiNIC.sh
1234567 | # 单网卡wget https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/Rinetd/bash/tcp_nanqinlang-rinetd-centos.shbash tcp_nanqinlang-rinetd-centos.sh # 多网卡wget https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/Rinetd/bash/tcp_nanqinlang-rinetd-centos-multiNIC.shbash tcp_nanqinlang-rinetd-centos-multiNIC.sh |
---|
运行脚本会出现下面几个选项:
安装 rinetd-bbr
此脚本会在/home/tcp_nanqinlang进行安装,所以安装完成后不要动这个文件夹了(除非你想修改端口)。安装过程中,会提示输入端口号。多个端口号用空格隔开。不支持端口段。安装完成后,会开启 rinetd-bbr。以后重启机器也会随开机自启。使用前请注意自己的 iptables 相关设置。
此命令用于检查 rinetd-bbr 运行与否,可通过返回的提示判断。
运行此命令会删除 /home/tcp_nanqinlang 、移除 rc.local 对应开机自启项和清空 iptables raw 表。属于完整卸载,不会有残留。且卸载后无需重启。
三、OpenVZ 魔改 BBR - LKL 一键脚本
来源:南琴浪 GITHUB项目地址
优点:支持IP段加速
安装方法:
# Debian 8+ # 64 bit # ldd > = 2.14 # tun/tap enabled wget https://github.com/tcp-nanqinlang/lkl-haproxy/releases/download/1.1.1/tcp_nanqinlang-haproxy-debian.sh bash tcp_nanqinlang-haproxy-debian.sh # CentOS 7 # 64 bit # ldd > = 2.14 # tun/tap enabled wget https://github.com/tcp-nanqinlang/lkl-haproxy/releases/download/1.1.1/tcp_nanqinlang-haproxy-centos.sh bash tcp_nanqinlang-haproxy-centos.sh
12345678910111213 | # Debian 8+# 64 bit# ldd > = 2.14# tun/tap enabledwget https://github.com/tcp-nanqinlang/lkl-haproxy/releases/download/1.1.1/tcp_nanqinlang-haproxy-debian.shbash tcp_nanqinlang-haproxy-debian.sh # CentOS 7# 64 bit# ldd > = 2.14# tun/tap enabledwget https://github.com/tcp-nanqinlang/lkl-haproxy/releases/download/1.1.1/tcp_nanqinlang-haproxy-centos.shbash tcp_nanqinlang-haproxy-centos.sh |
---|
以下进行脚本使用说明:
此命令用于安装 LKL。
在/home/tcp_nanqinlang进行安装,所以安装完成后不要动这个文件夹了(除非你想修改端口)。
安装过程中,会提示你选择
<span style="font-family: Courier New; font-size: medium;">单个端口</span>
1 | <span style="font-family: Courier New; font-size: medium;">单个端口</span> |
---|
或
<span style="font-family: Courier New; font-size: medium;">端口段</span>
1 | <span style="font-family: Courier New; font-size: medium;">端口段</span> |
---|
输入,具体已在运行脚本的提示中有说明,这里不再赘述。
安装完成后,会开启 LKL。以后重启机器也会随开机自启。
以后若需要修改转发端口,请将/home/tcp_nanqinlang/haproxy.cfg中的端口号和/home/tcp_nanqinlang/redirect.sh中的端口号改为你想要的端口或端口段,修改完成后重启服务器。
使用前请注意自己的 iptables 相关设置。
此命令用于检查 LKL 运行与否,可通过返回的提示判断。
运行此命令会卸载 haproxy、删除 /home/tcp_nanqinlang、移除 rc.local 开机自启项。稍后请自行移除iptables相关规则。
该脚本项目最新的地址是:https://github.com/tcp-nanqinlang
一、BBR+BBR魔改+Lotsever(锐速)一键脚本 for Centos/Debian/Ubuntu
来源:千影
支持系统 Centos 6+ / Debian 7+ / Ubuntu 14+ BBR魔改版不支持Debian 8
安装:
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" chmod +x tcp.sh ./tcp.sh
123 | wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh"chmod +x tcp.sh./tcp.sh |
---|
魔改BBR一键安装
说明:运行脚本后会出现上图的界面。安装魔改BBR先选择1安装对应内核,安装完毕后重启机器,然后再进入脚本目录重新执行脚本,选择4安装魔改BBR。
如果出现下图界面,需要选NO:
此界面要选NO
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有