使用方法
已测试通过的系统: Ubuntu 14.04 x64、Ubuntu 16.04 x64、CentOS 6 x64、CentOS 7 x64 只支持 64 位系统,要求 glibc 版本 2.14 以上。
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
多端口加速
安装的时候只配置了一个加速端口,但是你可以配置多端口加速,配置方法非常简单。 修改文件
vi /usr/local/haproxy-lkl/etc/port-rules
使用 systemctl 或者 service 命令来启动、停止和重启 HAporxy-lkl:
service haproxy-lkl {start|stop|restart}
更新 glibc
- wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz
- wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz
- tar -zxf glibc-2.15.tar.gz
- tar -zxf glibc-ports-2.15.tar.gz
- mv glibc-ports-2.15 glibc-2.15/ports
- mkdir glibc-build-2.15
- cd glibc-build-2.15
- ../glibc-2.15/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
- make all && make install
检查一下:
# ldd --version
判断 BBR 已正常工作
判断 bbr 是否正常启动可以尝试 ping 10.0.0.2,如果能通,说明 bbr 已经启动。
然后检查 iptables 规则
1. iptables -t nat -nL
2. Chain PREROUTING (policy ACCEPT)
3. target prot opt source destination
4. LKL_IN all -- 0.0.0.0/0 0.0.0.0/0
5.
6. Chain POSTROUTING (policy ACCEPT)
7. target prot opt source destination
8.
9. Chain OUTPUT (policy ACCEPT)
10. target prot opt source destination
11.
12. Chain LKL_IN (1 references)
13. target prot opt source destination
14. DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8989 to:10.0.0.2
里边会看到多了一张链表 LKL_IN,里边有相应的端口规则。
使用方法
已测试通过的系统: Ubuntu 14.04 x64、Ubuntu 16.04 x64、CentOS 6 x64、CentOS 7 x64 只支持 64 位系统,要求 glibc 版本 2.14 以上。
多端口加速
安装的时候只配置了一个加速端口,但是你可以配置多端口加速,配置方法非常简单。 修改文件
vi /usr/local/haproxy-lkl/etc/port-rules
使用 systemctl 或者 service 命令来启动、停止和重启 HAporxy-lkl:
service haproxy-lkl {start|stop|restart}
更新 glibc
检查一下:
# ldd --version判断 BBR 已正常工作
判断 bbr 是否正常启动可以尝试 ping 10.0.0.2,如果能通,说明 bbr 已经启动。
然后检查 iptables 规则
1. iptables -t nat -nL2. Chain PREROUTING (policy ACCEPT)
3. target prot opt source destination
4. LKL_IN all -- 0.0.0.0/0 0.0.0.0/0
5.
6. Chain POSTROUTING (policy ACCEPT)
7. target prot opt source destination
8.
9. Chain OUTPUT (policy ACCEPT)
10. target prot opt source destination
11.
12. Chain LKL_IN (1 references)
13. target prot opt source destination
14. DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8989 to:10.0.0.2
里边会看到多了一张链表 LKL_IN,里边有相应的端口规则。