Iliou - TP1
Iliou - TP1
Username [email protected]
Password g!DpeAG40@
In the toolbar at the top of the Azure portal, select the Cloud Shell
icon.
In the Welcome to Azure Cloud Shell dialog, select BASH.
After the cloud shell initializes and puts you at a text prompt, exit
the shell.
In this exercise, you create an Azure virtual machine (VM) and install
Nginx, a popular web server.
You could use the Azure portal, the Azure CLI, Azure PowerShell, or
an Azure Resource Manager (ARM) template.
azurecli
az vm create \
--resource-group myRGKV-lod41288821 \
--name my-VM-41288821 \
--image Ubuntu2204 \
--admin-username azureuser \
--generate-ssh-keys
Your VM will take a few moments to come up. You name the VM
my-VM-41288821. You use this name to refer to the VM in later
steps.
Run the following az vm extension set command to configure Nginx
on your VM:
azurecli
az vm extension set \
--resource-group myRGKV-lod41288821 \
--vm-name my-VM-41288821 \
--name customScript \
--publisher Microsoft.Azure.Extensions \
--version 2.1 \
--settings
'{"fileUris":["https://raw.githubusercontent.com/MicrosoftDocs/msle
arn-welcome-to-azure/master/configure-nginx.sh"]}' \
Installs Nginx.
Continue
That's all for this exercise. The sandbox will keep running, and you'll
come back to this point in a few units to update the network
configuration so you can get to the website.