Error in Exercise - Create an Azure virtual machine and installing Nginx

Jeramie Rentfrow 0 Reputation points
2024-08-13T15:51:58.8733333+00:00

Unable to locate package nginx

tee: /var/www/html/index.html: No such file or directory

URL of module: https://learn.microsoft.com/en-us/training/modules/describe-azure-compute-networking-services/3-exercise-create-azure-virtual-machine

This question is related to the following Learning Module

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
2,227 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rakesh Gurram 12,815 Reputation points Microsoft External Staff
    2024-08-13T16:46:33.63+00:00

    Hi Jeramie Rentfrow,

    Thank you for reaching out to us on the Microsoft Q&A forum.

    Apologies for the inconvenience. Let's address your issue step by step:

    1. Public Address Observation: After completing step 1, you should see a public address similar to this: 40.112.149.7, confirming that the first step was successful.
    2. Proceed to Step 2: Next, copy the public IP address and move on to step 2.

    User's image

    1. SSH Command Execution: After completing step 2, enter the following command in your terminal or command prompt: ssh azureuser@<VM public IP address> (e.g., ssh azureuser@40.112.149.7). When prompted with a message asking if you want to continue connecting, type "yes" (without quotes) and press Enter to proceed.

    User's image

    Cloud Shell Commands: Once connected via SSH, run the following commands sequentially in your cloud shell:

    • sudo apt-get update
    • sudo apt-get install -y nginx
    • echo "<html><body><h2>Welcome to Azure! My name is $(hostname).</h2></body></html>" | sudo tee -a /var/www/html/index.html

    I3

    After running the commands, see if the issue persists. If you encounter any difficulties, please share the specific error message or behavior. I’m here to help and can offer additional troubleshooting or resources if needed.

    If you found the information helpful, we would greatly appreciate it if you could acknowledge it by selecting the Accept Answer & Upvote options.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.