Skip to main content

Command Palette

Search for a command to run...

Install Software on VM

SSH into a VM and install packages such as Nginx, Apache, or Docker.

Published
1 min read
  1. Login to your google cloud console

  2. Go to Compute Engine

  3. Then, click on create instance

  4. Name your instance, select region and zone and make sure to Allow HTTP and HTTPS traffic

  5. Now, SSH into it and install apache and commands for that are listed below

    • sudo su

    • apt update

    • apt -y install apache2

  6. apache is installed

  7. Close this SSH, and copy your External IP and paste it into the browser

  8. You will be able to see apache2 page that means your apache is successfully installed

  9. Now, you can close this page

  10. Similarly, you can install Nginx, Docker and many more packages.

You’ve successfully installed software on your VM using SSH—nice work! Next up, we’ll take it a step further by hosting a simple website on your VM. Get ready to bring your cloud project to life in the upcoming post!

GCP VM Series: From Zero to Compute

Part 6 of 14

Get ready for an exciting ride in Google Cloud! Our series takes you through every method of creating virtual machines in GCP, complete with engaging tutorials and practical labs. Elevate your cloud game and become a VM virtuoso!

Up next

Accessing a VM via SSH

Connect to your VM using SSH from Google Cloud Console or terminal.