Installing HTTP Webserver on Google Compute Engine Virtual Machine | Scribe

    Installing HTTP Webserver on Google Compute Engine Virtual Machine

    • Hafeez Baig |
    • 21 steps |
    • 2 minutes
    information ordinal icon
    Refer to this guide to learn how to create a Virtual Machine in GCP\ <https://scribehow.com/shared/Creating_your_first_Virtual_Machine_in_GCP__dF2VjMksT5en6PowYws7lQ>
    1
    Sign in into the **Google Cloud Platform**
    2
    Type "**Compute Engine**" in the search bar and click on the **Compute Engine** option
    information ordinal icon
    **What is Compute Engine?** Google Compute Engine (GCE) is an Infrastructure-as-a-Service (IaaS) offering from Google Cloud Platform (GCP) that allows users to run virtual machines (VMs) on Google's infrastructure. It provides scalable and flexible computing resources, high-performance persistent storage, advanced networking capabilities, and integration with other GCP services, making it suitable for a variety of workloads including web hosting, data processing, and high-performance computing.
    3
    **VM instances** wizard will open, click on the Name **my-first-vm**
    4
    **my-first-vm** wizard will open, click on the **SSH** button on the top left side
    information ordinal icon
    **What is SSH?**\ \ SSH, or Secure Shell, is a cryptographic network protocol used to securely access and manage remote computers and servers over an unsecured network. It provides a secure channel for accessing a command-line interface (CLI) on a remote machine, allowing users to execute commands, transfer files, and perform administrative tasks securely. In the context of Google Cloud Platform (GCP), SSH is commonly used to connect to and manage virtual machine instances running in Compute Engine.
    5
    **SSH** wizard will open in a new window **Note:** Connecting to the VM instance via SSH will take some time.
    6
    **Authorize** wizard will open, click on the **Authorize** button
    7
    **SSH-in-browser** wizard will open, type the command [[sudo su ]] to get the root access
    information ordinal icon
    **What is [[sudo su]] command?**\ \ The `sudo su` command in Unix-like systems allows a user to switch to the superuser (root) account, gaining full administrative privileges after authenticating with `sudo`.
    8
    Type the command [[apt update]] to update the packages
    information ordinal icon
    **What is [[apt update ]]command?**\ \ The `apt update` command is used in Debian-based Linux distributions to update the local package index. This ensures that the package manager has the latest information about available packages and their versions from the configured repositories. Running this command is typically the first step before upgrading packages or installing new software.
    9
    Type the command [[apt install apache2 ]] to install apache2
    information ordinal icon
    **What is [[apt install apache2]] command?**\ \ The `apt install apache2` command is used in Debian-based Linux distributions to install the Apache HTTP Server. This command retrieves the Apache package from the configured repositories and installs it on the system, setting up the necessary files and dependencies to run the Apache web server.
    10
    Type [[Y ]]to continue the installation
    11
    Go back to the **VM instances** wizard, scroll to the **Network interfaces** section and copy the **External IP address**
    12
    Open new tab in browser and paste the copied **External IP address** in the search bar
    13
    **Apache2 Debian Default Page** wizard will open
    information ordinal icon
    Congratulations you have successfully installed **Apache2** Webserver in Virtual Machine