主页 > 建站 > openvz VPS Centos主机安装BBR

openvz VPS Centos主机安装BBR

2018年1月28日 openvz VPS Centos主机安装BBR有30条评论 阅读: 78,979 次

推荐安装魔改BBR:
Centos 6 64位openvz系统安装bbr:
wget https://raw.githubusercontent.com/nanqinlang-tcp/tcp_nanqinlang/master/Rinetd/bash/tcp_nanqinlang-rinetd-centos.sh
bash tcp_nanqinlang-rinetd-centos.sh

普通BBR安装方法如下:
-----------------------------------------------------------------------------------
先去 VPS 的 Panel 里打开 TUN/TAP 功能 (如$5/年的HMB可登录https://solusvm.hostmybytes.com/login.php自己打开tun,如果你的vps面板中无法自己打开,可以发ticket让客服打开)

判断tun/tap是否打开:
ssh登录后输入cat /dev/net/tun,如果返回“ File descriptor in bad state”则表示打开

1、如果本机glibc小于2.14,先更新glibc
查看glibc版本
ldd --version
ldd (GNU libc) 2.12
编译安装:
1)安装gcc
yum install gcc
2)编译安装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
此处编译会很久,请耐心等待!

2、安装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
配置加速端口

安装的时候只配置了一个加速端口,但是你可以配置多端口加速,配置方法非常简单。 修改文件
# vi /usr/local/haproxy-lkl/etc/port-rules
在文件里添加需要加速的端口,每行一条,可以配置单个端口或者端口范围,以 # 开头的行将被忽略。 例如:8800 或者 8800-8810 配置完成之后,只需要重启 haproxy-lkl 即可(service haproxy-lkl restart)。
如需卸载,请执行:
./ovz-bbr-installer.sh uninstall

3、检查bbr是否工作
判断 bbr 是否正常启动可以尝试 ping 10.0.0.2,如果能通,说明 bbr 已经启动。

然后检查 iptables 规则
输入iptables -t nat -nL可以看到加速端口的规则:

如果开启加速后ss或ssr无法使用,可以尝试修改ss或ssr的监听地址,改成“0.0.0.0”或“127.0.0.1”地址再试

评论:30

  1. 回复
    2018年2月1日 于 下午6:04

    5美元的那个 安装失败哦 不知道怎么回事 升级不了。

  2. ywb 回复
    2018年2月2日 于 上午9:29

    我就是在$5上安装成功的,用的是centos 6 X64系统

  3. CellPhone 回复
    2018年2月2日 于 下午11:56

    我装了后看油管没什么加成哦
    是加速端口不对吗?那应该怎么加速哪个?

    • ywb 回复
      2018年2月3日 于 上午8:34

      文章中有啊

  4. wmj 回复
    2018年2月5日 于 下午5:41

    ping不通10.0.0.2怎么办

    • ywb 回复
      2018年2月5日 于 下午5:52

      没安装正确,检查步骤

  5. 837194841 回复
    2018年2月6日 于 上午2:43

    加速完成,就是编译安装glibc需要点耐心。反正我是挂在服务器上操作的。

    • ywb 回复
      2018年2月6日 于 下午3:23

      不是邮箱,账号和密码在vps开通后会发到你邮箱

  6. yeti 回复
    2018年2月15日 于 上午12:11

    怎么修改监听地址为127.0.0.1呢

  7. lee 回复
    2018年2月16日 于 下午6:47

    https://solusvm.hostmybytes.com/login.php

    这个网的账号密码,为什么开通vps都没有收到?

    • lee 回复
      2018年2月16日 于 下午6:48

      收到了,邮件进了广告邮件列表。。。

  8. 虫虫 回复
    2018年2月22日 于 上午12:14

    安装后如何使用呢?

  9. 虫虫 回复
    2018年2月22日 于 上午12:19

    安装成功了,K3中如何使用呀?

    • ywb 回复
      2018年2月22日 于 上午11:38

      官改酸酸乳

      • 虫虫 回复
        2018年2月23日 于 上午7:28

        服务器安装成功,路由器是官改,怎么连接,不能打开Google呀

      • 虫虫 回复
        2018年2月23日 于 上午7:29

        有路由器官改教程吗?

  10. emi 回复
    2018年2月23日 于 下午2:09

    你好,大神,我买了你介绍的vps,我用putty连接vps一直提示network error:Connection timed out,请问如何解决,谢谢

    • ywb 回复
      2018年2月23日 于 下午3:38

      先看是不是被墙,发ticket

      • emi 回复
        2018年2月24日 于 下午1:34

        客服回复说估计被墙了。。但是我用putty登陆vps的ssh啊。。

      • emi 回复
        2018年2月24日 于 下午1:50

        Hi,
        Your VPS is responding just fine. You can verify this by navigating to any external ping service such as http://ping.pe or https://network-tools.com/
        It sounds like this is an issue with your local ISP / GFW being unable to connect to your server IP, and in that case it is unfortunately not something that we can change or control.
        We can change your VPS IP for a one-time administrative fee of $2.99, however please note there is no way we can guarantee connectivity between our network and the GFW even after an IP change.
        Please let me know if you would like to proceed with me sending you the invoice for the VPS IP change, or if you would like to keep it the way it is.
        Thanks,
        Regards,
        Aaron M.
        HostMyBytes

  11. goodhzg 回复
    2018年2月23日 于 下午9:18

    如何搭建SSR服务?SS服务和SSR服务可以共存么?

    • francis 回复
      2018年3月3日 于 下午8:41

      可以共存,我就是共存的

  12. 小白 回复
    2018年3月11日 于 下午3:45

    添加端口不会啊 不知道怎么录新的端口

  13. zm 回复
    2018年3月22日 于 下午11:28

    在 编译安装glibc ,执行 make all && make install 这一步出错:

    make[2]: *** [/root/glibc-build-2.15/math/s_frexp.os] Error 1
    make[2]: Leaving directory `/root/glibc-2.15/math'
    make[1]: *** [math/subdir_lib] Error 2
    make[1]: Leaving directory `/root/glibc-2.15'
    make: *** [all] Error 2

  14. Mos 回复
    2018年3月25日 于 下午3:04

    加速完成ss连不上,才发现最后有一句改监听地址。。改了ok~

  15. 回复
    2018年6月16日 于 上午11:12

    cd glibc-build-2.15
    ../glibc-2.15/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

  16. Dwcker 回复
    2018年7月26日 于 下午2:32

    服务器能ping通,但是xshell连不上,是不是被墙了

    • ywb 回复
      2018年7月26日 于 下午7:59

      有可能,你可以用一个国外主机连接试试

  17. qilixiang 回复
    2018年11月29日 于 下午3:05

    安装完bbr之后 v2ry无法科学上网(没装的之前是可以的)。

虫虫进行回复 取消回复

新用户的评论需审核后才会显示;

电子邮件地址不会被公开;
必填项已用*标注