There are basic steps one need to follow to create a linux virtual machine. The steps are as follows;
Step 1 :
The first thing you need to do is login to the azure portal, search for virtual machine. Click the create button.
Step 2 :
Create or use an existing resource group
Step 3 :
Give the virtual machine a name - 'Linuxvm'
Step 4 :
Image- choose Ubuntu server
Step 5 :
create your username and password
Step 6 :
Choose a size (standard D2as_v4)
Step 7:
Now move to administrator account.You can choose to either use ssh public key or password as Authentication type.
Step 8 :
Under Inbound ports - select SSH (22) and HTTP(80)
Step 9 :
Move to Monitoring and 'disable' diagnostic. Then click review and create
Step 10 :
Validation passed- Click create
Step 11:
Deployment in progress( Give it sometime)
Step 12 :
Deployment is completed. Click on "Go to resource"
Step 13 :
Click on connect and select Native SSH
wait for validation, also give it some time until it is configured
Step 14:
Open powershell on your computer and type in this command
ssh username@Ipaddress
Respond yes to continue
Step 15:
Type in your password
Step 16:
You need to be in root to continue or do anything on linux.
Type in the command
> sudo su
Step 17:
Now we install nginx with this command (Package manager)
`
apt install nginx
`
Yayyyy we have succesfully created a Linux virtual machine and installed nginx
Step 18 :
Now we test to make sure of our installation.
Copy your public Ip address and run it on your computer web browser.
Yippee💃 Well done mate.
I hope this is of great help to you.
Top comments (0)