之前的文章写了《Linode VPS 安装Google BBR教程》,但是提到了针对Linode的Xen方案暂时装不了。今天我又花时间研究了一下,证明Xen方案也是可以装BBR的。

首先需要修改Xen VPS的内核。参考官方的教程《Run a Distribution-Supplied Kernel with PV-GRUB》。

apt-get update          
apt-get upgrade --show-upgraded

卸载grub2,安装grub。

apt-get install linux-image-virtual
apt-get purge grub2 grub-pc
apt-get install grub
mkdir /boot/grub
update-grub

When you are asked which devices you would like to install grub on, leave all listed devices unchecked and select Ok to continue. When you are asked whether you would like to continue without installing GRUB, answer yes. When you are asked to confirm removal of GRUB 2 from /boot/grub, answer yes. When you are asked whether you would like a menu.lstfile generated for you, answer yes.

简单地说遇到有问题的都选YES。然后第一次问你在哪装grub的时候一个都不要选,直接点ok。

打开/boot/grub/menu.lst这个文件。

timeout 3

修改为

timeout 10

# kopt=root=UUID=de400b9f-2578-488e-8664-250a8455a6fc ro

修改为

# kopt=root=/dev/xvda console=hvc0 ro quiet

# groot=(hd0,0)

修改为

 # groot=(hd0)

升级一下grub

update-grub

打开/etc/init/hvc0.conf,查看是否和下面的一致:

  # hvc0 - getty
  #
  # This service maintains a getty on hvc0 from the point the system is
  # started until it is shut down again.

  start on stopped rc RUNLEVEL=[2345]
  stop on runlevel [!2345]

  respawn
  exec /sbin/getty -8 38400 hvc0

接下来,将内核修改为pv-grub-x86_32 或者 pv-grub-x86_64。

确保root device是xvda。

Filesystem/Boot Helpers 这里,将 Distro Helper 禁用。

保存profile,然后重启。

接下来一键安装bbr。

wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh
chmod +x bbr.sh
./bbr.sh

Linode目前最便宜只需5美元一个月,有需要可以直接点击下方链接购买。

方案内存CPU硬盘流量带宽In/Out价格购买
Linode 1G1GB1核20GB SSD1TB40Gbps/1000Mbps$5/月购买
Linode 2G2GB1核30GB SSD2TB40Gbps/1000Mbps$10/月购买
Linode 4G4GB2核48GB SSD3TB40Gbps/1000Mbps$20/月购买
Linode 8G8GB4核96GB SSD4TB40Gbps/1000Mbps$40/月购买
Linode 12G12GB6核192GB SSD8TB40Gbps/1000Mbps$80/月购买
Linode 24G24GB8核384GB SSD16TB40Gbps/2000Mbps$160/月购买
Linode 48G48GB12核768GB SSD20TB40Gbps/4000Mbps$320/月购买
Linode 64G64GB16核1152GB SSD20TB40Gbps/6000Mbps$480/月购买
Linode 80G80GB20核1536GB SSD20TB40Gbps/8000Mbps$640/月购买
Linode 16G16GB1核20GB SSD5TB40Gbps/1000Mbps$60/月购买
Linode 32G32GB2核40GB SSD6TB40Gbps/1500Mbps$120/月购买
Linode 60G60GB4核90GB SSD7TB40Gbps/3000Mbps$240/月购买
Linode 100G100GB8核200GB SSD8TB40Gbps/6000Mbps$480/月购买
Linode 200G200GB16核340GB SSD9TB40Gbps/10000Mbps$960/月购买
Linode Xen VPS 安装 Google BBR 教程

发表评论

您的电子邮箱地址不会被公开。