把博客搬到国外的VPS(Bandwagon)了
经过了大概一天的努力,终于把博客完全地从阿里云转移到了国外的VPS --- Bandwagon(搬瓦工?)。为什么要搬呢?有几个原因:
- 国内的VPS(云主机)太贵。阿里云上面最低配置(1M+10G+512M+1Core)的ECS(弹性计算服务)也要大概55+RMB一个月。对我等月均收入为负、只需要建一个非营利的个人博客的用户太说,太奢侈。
- 配置一台VPS最主要的作用我觉得还是当梯子用,毕竟`爬得高才能看得远`,搭建博客只是顺便利用了资源。然后,这是国内的主机无法办到的。
搬到Bandwagon还是因为如风哥,他一直用它来搭建ShadowSocks服务器。听说还不错,然后我就跑到Bandwagon官网去看看了,对于性价比来说,确实诱人多了,比如我目前所选择的配置:
Basic VPS - Self-managed - 20G PROMO V3 - PHOENIX AZ Location: Phoenix AZ (no other locations available on this plan) Self-managed service SSD: 20 GB RAM: 1024 MB CPU: 1x Intel Xeon BW: 2000 GB/mo Link speed: 1 Gigabit VPS technology: OpenVZ/KiwiVM Linux OS: 32-bit and 64-bit Centos, Debian, Ubuntu, Fedora Instant OS reload 1 Dedicated IPv4 address Full root access PPP and VPN support (tun/tap) Instant RDNS update from control panel No contract, anytime cancellation Strictly self-managed, no support 99% uptime guarantee 30-day money back guarantee
就上面这配置的主机,如果是在国内,少说也得 60+¥/月,然而,我购买的这个VPS报价却是 $2.99 USD Monthly,按一年算了来也就 120¥/年,确实要便宜多了。我要求不高,这个已经足够用了。如风哥只用它用跑ShadowSocks,他的配置只需 9.9刀/年!好tm便宜!!官方上还有更便宜的:$3.99/年,难以想像!
下面来看下测试的速度,渣渣Win10系统用不了学校电信渣渣拨号器软件,所以就用的移动宽带(坑得要命,一辈子也不想再用了):
root@twofei:~# ping blog.twofei.com PING twofei.com (104.224.171.61) 56(84) bytes of data. 64 bytes from 104.224.171.61: icmp_seq=1 ttl=50 time=287 ms 64 bytes from 104.224.171.61: icmp_seq=2 ttl=50 time=299 ms 64 bytes from 104.224.171.61: icmp_seq=3 ttl=50 time=297 ms 64 bytes from 104.224.171.61: icmp_seq=4 ttl=50 time=297 ms 64 bytes from 104.224.171.61: icmp_seq=5 ttl=50 time=287 ms 64 bytes from 104.224.171.61: icmp_seq=6 ttl=50 time=289 ms 64 bytes from 104.224.171.61: icmp_seq=7 ttl=50 time=306 ms 64 bytes from 104.224.171.61: icmp_seq=8 ttl=50 time=315 ms 64 bytes from 104.224.171.61: icmp_seq=9 ttl=50 time=330 ms 64 bytes from 104.224.171.61: icmp_seq=10 ttl=50 time=311 ms 64 bytes from 104.224.171.61: icmp_seq=11 ttl=50 time=296 ms 64 bytes from 104.224.171.61: icmp_seq=12 ttl=50 time=298 ms 64 bytes from 104.224.171.61: icmp_seq=13 ttl=50 time=299 ms 64 bytes from 104.224.171.61: icmp_seq=14 ttl=50 time=275 ms 64 bytes from 104.224.171.61: icmp_seq=15 ttl=50 time=280 ms 64 bytes from 104.224.171.61: icmp_seq=16 ttl=50 time=285 ms 64 bytes from 104.224.171.61: icmp_seq=17 ttl=50 time=265 ms 64 bytes from 104.224.171.61: icmp_seq=18 ttl=50 time=273 ms 64 bytes from 104.224.171.61: icmp_seq=19 ttl=50 time=287 ms 64 bytes from 104.224.171.61: icmp_seq=20 ttl=50 time=280 ms ^C --- twofei.com ping statistics --- 20 packets transmitted, 20 received, 0% packet loss, time 19023ms rtt min/avg/max/mdev = 265.692/293.257/330.618/15.055 ms
平均时延大概300ms,有点差,不过就这样吧。。。总比 `444` 好。
另外,今天在配置环境的时候遇到PHP/MySQL的一个非常奇葩的问题:可以用 `127.0.0.1` 连接到mysql,但却无法使用 `localhost` 连接,而且我的 `/etc/hosts` 文件中是有 `127.0.0.1 localhost` 这一规则的。被这个小问题搞了两个小时!因为错误提示一直是 (2) No such file or directory,所以我没觉得是这里的问题,好球坑!Google了也没找到原因,真奇葩!