DEV Community

Ikuesan Adeola
Ikuesan Adeola

Posted on

CREATING A LINUX VIRTUAL MACHINE USING AZURE PORTAL

Microsoft azure is a web-based portal which has the interface that allows user to create azure resources. In creating the Linux virtual machine, ubuntu server 22.04 LTS will be used, ssh will be deployed and NGINX web server will be installed.

CREATING THE VIRTUAL MACHINE
STEP 1:
Search for virtual machine or select virtual machine under azure services.

Image description

STEP 2:
Click on "create" in the virtual machine page then select azure virtual machine. Create a virtual machine page opens.

Image description

STEP 3:
Fill in the required details for the virtual machine such as Subscription, Resource group, Virtual machine name, Region availability option, Security type, Image (which is the operating system to be used), Virtual machine architecture, Size, Administrator account etc. Under Image, select ubuntu server 22.04 LTS-x64 Gen 2, select SSH public key as the Authentication type. In Username enter "azureuser". Under SSH public key source, leave the default of Generate new key pair and Under Inbound port rules > Public inbound ports, choose Allow selected ports and then select SSH (22) and HTTP (80).

Image description

Image description

STEP 4:
Click on "Review+create". This allows the check through the properties and details provided then validate it.

Image description

STEP 5:
After validation is complete, click on "Create". then it generates new key pair. Click on "Download private key and create resource".

Image description

STEP 6:
Click on "Go to resource". It opens the page which the properties for the virtual machine created are listed. Scroll down to see more.

Image description

Image description

STEP 7:
Open command prompt on your PC, input "ssh -i c:\downloaded file path.pem azureuser@public address created in the virtual machine". then press enter.

STEP 8:
To update the package resources, input "sudo apt-get update -y"

STEP 9:
Input "sudo apt-get -y install nginx" to install the latest NGINX package.

STEP 10:
Open the browser. Input the public address, then press "Enter"

Top comments (0)