Setting Up a Google Cloud Development Environment

15 minutes
  • 7 Learning Objectives

About this Hands-on Lab

In this hands-on lab, you’ll create a Compute Engine virtual machine instance, set it up to run an Nginx web server, modify the home page, and then test your implementation.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Log in to Google Cloud.
  1. Visit
  2. Click Sign in, in the upper right corner of the screen.
  3. Enter your Linux Academy supplied user name and click Next.
  4. Enter your Linux Academy supplied password and click Next.
Create a Compute Engine VM.
  1. From the main navigation, choose Compute Engine > VM instances.
  2. In the VM Instances area, click Create.
  3. With New VM Instance chosen from the options on the left, configure your instance:
    • In the Name field, provide a relevant name using hyphens, like la-pro-dev-1.
    • Keep the suggested Region and Zone.
    • Change the Machine Type to small.
    • In the Boot Disk section, click Change and select Ubuntu 18.04 from the list; click Select.
    • In the Identity and API Access section, for Access Scopes, choose Allow full access to all Cloud APIs.
    • Under Firewall, choose the Allow HTTP traffic option.
  4. Click Create.
Log in to an instance via SSH.
  1. After the VM has been created, a green check mark will appear next to the instance name on the Compute Engine VM page.
  2. Click the associated SSH button.
Install Nginx.
  1. In the SSH window that appears, change to the root user by entering sudo -i.
  2. Enter the following code to set up Nginx:
    apt-get update
    apt-get install -y nginx
    service nginx start
Confirm Nginx is working.
  1. Return to the Compute Engine VM page of the Google Cloud console.
  2. Click the Extenal IP address associated with your VM instance.
  3. Confirm that Nginx is running properly.
Modify the Nginx home page.
  1. Return to the SSH window.
  2. Enter the following command to change directories:
    cd /var/www/html
  3. Install nano and open the index page for editing:
    sudo apt install nano
    sudo nano index.nginx-debian.html
  4. Move your cursor below the h1 tag and add the following code:
    <h2>Brought to you by Linux Academy!</h2>
  5. Press Ctrl+O to write out the file and press Enter/Return to confirm.
  6. Press Ctrl+X to exit the editor.
  7. Enter exit to end the SSH session and close the window.
Confirm the update.
  1. From the Google Cloud VM page, click the External IP link.
  2. In the browser window, verify the revised page is visible.

Additional Resources

You’ve been asked to set up a Google Cloud Compute Engine VM instance as a web server. To keep costs down, the instance should use a shared vCPU with 1.7 GB of memory with an Ubuntu 18.10 disk image for the boot disk. All Google Cloud APIs should have access, and the firewall should initially allow HTTP ingress. The web team requests that you install an Nginx server and modify the home page to ensure everything is working properly.

You’ll need to accomplish the following steps to complete your task:

  1. Create a Compute Engine VM instance with the proper specifications.
  2. SSH into your VM.
  3. Install and start the Nginx server.
  4. Verify the server is working.
  5. Modify the server home page.
  6. Verify your updates are complete.
What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


Sign In
Welcome Back!
Thanks for reaching out!

You’ll hear from us shortly. In the meantime, why not check out what our customers have to say about ACG?