having issue installing Nginx on azure VM training

Paul Cheng 0 Reputation points
2024-10-08T04:30:35.06+00:00

Cannot complete step 2 when trying to install Nginx on the newly created azure VM under azure CLI. it shows failure after entering the given command.

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.
1,744 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AmaranS 6,970 Reputation points Microsoft Vendor
    2024-10-08T05:47:47.1233333+00:00

    Hi Paul Cheng,

    Thank you for reaching out to us on the Microsoft Q&A forum. Based on our understanding of the issue, you're practicing the following Learning Path:

    TopicAZ-900

    Learning PathAzure Fundamentals: Describe Azure architecture and services.

    ModuleDescribe Azure compute and networking services

    Unit3 of 14 Exercise - Create an Azure Virtual Machine

    Please follow these troubleshooting steps to resolve the issue:

    1. Activate a new sandbox and create a new VM as mentioned in the Exercise (step1 at Create a Linux VM and install Nginx).

    2. After step 1, please make a note of Public IP address that was assigned to VM.

    1. Before moving into step2, connect to the newly created VM using ssh command in cloud shell. Please run the following command to connect VM:

    ssh azureuser@<VM public ip address>

    nginx1

    4. The system gives you to prompt Yes/No. Enter Yes.

    5.  Please run the following commands one after another in 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.

    nginx2

    · Exit 

    After completing the step 5, continue your module from step2 of Task 1: Create a Linux virtual machine and install Nginx at module 3 of 14.

    If the issue persists, please reach out to us and we'll be glad to assist you.

    If the information provided has been helpful to you then please accept the answer by clicking the Accept Answer on the post. We value your feedback, and it will help us to assist others who might have a similar query.

    Thank you.

    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.