0%

Google Cloud Platform 搭建

准备

  • 需要国际信用卡(visa/master)

  • Google账号

  • 2020年11月有效

一 注册账号

  1. 注册GCP
    https://cloud.google.com
    image.png
  2. 进入控制台

二 创建实例

  1. 左侧选择 Compute Engine — VM实例
  2. 点击 创建
    • 名称:随意
    • 地区:建议asia-east1-c
    • 机器类型:micro (微型便宜点…)
    • 启动磁盘 – Ubuntu 16.04 LTS
    • 防火墙:允许HTTP流量,允许HTTPS流量

image.png

三 配置网络

  1. 左侧导航 — 计算 — VPC网络
  2. 外部 IP 地址—类型改为静态(非必须操作)
  • 名称:任意
    image.png
    3 创建防火墙
    • 名称:任意
    • 流量方向:入站/出站(入站必须创建)
    • 目标:网络中的所有实例
    • 目标 IP 地址范围:0.0.0.0/0
    • 协议和端口: 全部允许
      image.png

四. 远程连接

  1. 打开ssh远程

左侧选择 Compute Engine — VM实例——ssh——在浏览器窗口中打开

image.png
2. 获取root权限:

1
2
sudo passwd root	#设置root密码
su #切换root用户
  1. 本地工具连接服务器(用不到可跳过)
1
2
3
4
#修改 vim /etc/ssh/sshd_config 
PermitRootLogin yes #root账号拒绝登录
PasswordAuthentication yes #使用密码登录
service ssh restart #重启ssh服务
  1. 测试本地到服务器的速度(用不到可跳过)
1
2
3
wget https://raw.githubusercontent.com/oooldking/script/master/superspeed.sh
chmod +x superspeed.sh
./superspeed.sh

五. 配置科学上网

1. V2Ray

  1. 官方教程:
    https://toutyrater.github.io/prep/install.html

  2. 脚本1: 命令行

    官网:https://github.com/233boy/v2ray/wiki

    1
    bash <(curl -s -L https://git.io/v2ray.sh)
  3. 脚本2:有图形化界面

    官网:https://github.com/sprov065/v2-ui

    1
    bash <(curl -Ls https://blog.sprov.xyz/v2-ui.sh)
    1
    2
    页面访问地址: http://xxx:65432    
    用户密码: admin/admin

2. BBR加速

  1. 四合一脚本

    1
    wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
    • 先在[1 – 3]切换内核(第一次显示为bbr内核也要切换一遍),重启

      中间有 Abort kernel removal? 界面,选no

    • 安装加速管理

    • 查看状态 ./tcp.sh