How to Create Linux virtual machine on Azure SSH into Linux server and install nginx on it.

How to Create Linux virtual machine on Azure SSH into Linux server and install nginx on it.

Login On Azure Website Type and Search for Virtual Machine and select Virtual machine

Click on the +create button (virtual machine hosted by Azure )

Click on +create on your extreme left

Select Azure Virtual Machine from the options.

Under project details for resource group click on Create New and give it a name (make it a special name or name of a project)

Under the Instance give your virtual machine a name of your choice.

Select a region of your choice

Select the availability zones (this is dependent on how highly available you want the virtual machine to be you can choose zone1 and zone2 if you want the VM to be highly available and you can choose zone1,zone2 and zone3 if you want your VM to be very highly available its all dependent on your budget, the higher the availability the higher the cost)

Because you are creating a Linux VM for image you will select Ubuntu Server

For Administrator type Select password (With this you can access your VM with password rather than SSH Public keys)

Create a User Name and Password of your choice

Under select inbound port SELECT HTTP and SSH this will enable us to view our virtual machine as a web page.

Click on the Monitoring tab and disable boot diagnostic

Then click on tags tab and tag the VM by putting your name or company name.

Click on create and Review wait for it to validate or show green.

Once Validation is passed Select Create

Once the deployment is complete, click on Go to Resource

Click on the ip address to increase the idle timeout

Increase the idle time out to 30min (this is to avoid your VM timing out after 5min )

After you are done with that then click save and hit the X sign on the right.

You have successfully created a Linux Virtual Machine, In other to connect to it or to SSH to it , open the power shell application on your windows laptop and type SSH |space |VM Name|VMipaddress NB there is no space between the VM name and ip address as seen below then click enter
You will be asked if you would like to continue then you type Yes
Then you will be asked for password then type the VM password you created and press Enter NB when you are typing your password it will be invisible that’s how Linux protects its self just keep typing when you are done hit the enter button.

Once the Password is correct the power shell will connect to the Linux VM after that it will instruct that for you to run command as an administrator you need to be connected as user “Root” you will use the Sudo command to achieve this next is type sudo su and hit Enter

After that you are connected as a root “user” then you can now instruct apt to install apt nginx by typing “apt install nginx” then hit Enter

Now let us confirm if nginx! Was actually installed on the virtual machine, we can do this by going to your Azure site and copy the ip address and paste it on the web page and see the result.

Copy ip address

Paste the ip address to the browser

From the result you can see that nginx! Has been successfully installed on the virtual machine.

Please follow and like us:
Pin Share