Home/Server & Website Managed Operations/Google Compute Engine (GCE) Registration Tutorial
Server & Website Managed Operations

Google Compute Engine (GCE) Registration Tutorial

 

QQ%E5%9B%BE%E7%89%8720160621003532

 

 

 

 

Setting up Google Compute Engine (GCE) can be quite cumbersome, so I have created this tutorial to outline the main creation process. I hope it helps.

Please pay attention to the text descriptions accompanying the images below; these highlight important points that require your attention.

 

There are 5 main steps:

  1. Registration
  2. Create a Project
  3. Create a VM Instance
    1. Remember to create a static external IP address
  4. Firewall Settings
  5. SSH Key Setup (If you are unfamiliar with SSH keys, you may need to review some basics)

Step 1: Registration

Official Website: https://cloud.google.com/

Click “Try Free” in the top right corner. Registration requires linking a credit card, so you will need one capable of making payments. I won’t go into detail about the registration process itself.

QQ%E5%9B%BE%E7%89%8720160620195812

Step 2: Create a Project

QQ%E5%9B%BE%E7%89%8720160620200104

Here, you only need to fill in the project name; there is no need to select advanced options. Just click Create.

QQ%E5%9B%BE%E7%89%8720160621201143

 

Step 3: Create a VM Instance

QQ%E5%9B%BE%E7%89%8720160621201229

When creating the instance, you must select a region! “asia-east” refers to the Taiwan node, which includes zones a, b, and c. It is said that zone c performs slightly better.

QQ%E5%9B%BE%E7%89%8720160621201309QQ%E5%9B%BE%E7%89%8720160621201319

Select the machine type. The default option costs $28 per month, while the lowest configuration costs $5 per month.

QQ%E5%9B%BE%E7%89%8720160621201355QQ%E5%9B%BE%E7%89%8720160621201412

Select the operating system. CentOS 6.8 requires downgrading the kernel before installing Raxxle (Ruishu). Other systems have not been tested.

QQ%E5%9B%BE%E7%89%8720160621201443QQ%E5%9B%BE%E7%89%8720160621201457

Finally, you need to configure the network and create an external IP address.

QQ%E5%9B%BE%E7%89%8720160621203657

Once you select Create, the instance will be successfully created!

QQ%E5%9B%BE%E7%89%8720160621201521

 

Step 4: Add SSH Key

GCE only allows SSH connections via SSH keys. If you do not know what an SSH key is, you should learn about it first. Here is a brief introduction on how to generate an SSH key and connect using Xshell 5.
QQ%E5%9B%BE%E7%89%8720160621201811

Select “Key Pair Generator Wizard” from the Tools menu.

QQ%E5%9B%BE%E7%89%8720160621202312

Click Next.

QQ%E5%9B%BE%E7%89%8720160621202331

Click Next again.

QQ%E5%9B%BE%E7%89%8720160621202344

Change the private key name to something easy to remember. The password can be left blank. Then click Next.

QQ%E5%9B%BE%E7%89%8720160621205545

The public key has been generated. Please make sure to record this public key!! You can choose to save it as a file for future reference. The SSH public key (placed on the server) and the private key (kept on the client) correspond one-to-one.

QQ%E5%9B%BE%E7%89%8720160621202504

After generation, the private key is already in the Private Key Manager panel.

QQ%E5%9B%BE%E7%89%8720160621202545

For the final step, copy the generated public key into GCE’s key management section. Then, add a space followed by the username after the “==” sign at the end. This username is used for SSH login and cannot be “root”.

QQ%E5%9B%BE%E7%89%8720160621202946

When logging in via Xshell, configure it as shown in the figure: select “Public Key” as the method and choose the key you just generated.

QQ%E5%9B%BE%E7%89%8720160621203029QQ%E5%9B%BE%E7%89%8720160621203102

Remember to enter the username you set when adding the SSH key.

QQ%E5%9B%BE%E7%89%8720160622100828

Step 5: Firewall Settings

After completing the SSH key setup, you can connect to GCE. However, if we do not configure the firewall, applications like Shadowsocks (SS) will not work. Therefore, we need to open the corresponding ports in the firewall.

QQ%E5%9B%BE%E7%89%8720160621203217QQ%E5%9B%BE%E7%89%8720160621203237
QQ%E5%9B%BE%E7%89%8720160621203426

There are two main firewall settings. For “Source Filter,” select “Allow from any source.” In the allowed ports field, enter all ports.

QQ%E5%9B%BE%E7%89%8720160621210421


QQ%E5%9B%BE%E7%89%8720160621203529

Step 6: Obtain Root Privileges After Connecting via SSH

Since GCE does not allow logging in directly as root, what should we do if we need root access? You can log in normally and then use the `sudo su` command to temporarily switch to the root user.

QQ%E5%9B%BE%E7%89%8720160622102050

 

OK, at this point, your GCE instance is ready for normal use.

FREE CHECKUP

Free server checkup

We will send a problem checklist and remediation advice within one business day — no obligation to engage.

135 410 16684
Weekdays Mon – Fri 10:00 – 22:00 (UTC+8) · 7×24 emergency response
Call now
CONTACT

Contact Us

How can we help?

* Required