To create and connect a Linux VM; Sign in to Azure portal @portal.azure.com
Select "Virtual Machine"
select 'create'
select 'Azure virtual machine'
Clicking on the azure virtual machine opens up the virtual machine page, where one can create and manage virtual machines.
A new page opens up with options for creating our VM
Step 1: Create a new resource group for the VM or use an existing RG
Step 2: Give the VM a name
Step 3: Select the desired region to deploy the VM
Step 4: Select the availability option, In this case 'no redundancy is
required'
Step 5: The Security type should be 'standard'
Step 6: The image for the VM should be 'Ubuntu' because it is the choice
of linux for this VM
The VM architecture is left at default
(The steps are displayed below)
Scrolling down;
- Select the size of the VM depending on what you want to do
- The authentication type is at default "SSH public key"
- Create a user name for the Administration account
- Select 'Generate a new key pair'
Scrolling down
- Name the key pair Select RSA SSH format
- Allow selected ports
- Under public inbound ports, select allow selected ports
- Select inbound ports (SSH (22)
- select 'Review + create'
The process is displayed as shown below
When the machine is successfully validated, click on 'create' to create the VM
A pop-up will appear, click 'download the private key and create the resource'
The private key is then downloaded and the resource is deployed.
click on "Go to Resource" and copy the public address
click on 'Connect', 'connect' to connect the VM
Go to your downloads folder to see the downloaded private key.
using command prompt, open the VM using command prompt using ssh -i filepath administratorusername@IPaddress
to achieve this, first copy the file path name, right click on the file name and copy the path name
Press Enter key to run and connect to the VM, the VM will then open
To install the web server, after running the linux vm, in front of the command, type "sudo apt update"
To upgrade the linux vm after updating the linux vm, type 'sudo apt upgrade'
To install the linux vm, on the command prompt, type "sudo apt install engine -y".
To confirm if engine is installed, copy the IP address and paste in a new browser tap, then enter key. you will see "a welcome to nginx' so that everyone with internet access can have access to your public key.
Top comments (1)
Great