DEV Community

Cover image for Create A Linux Virtual Machine/Install Nginx
Tolulope Adeleke
Tolulope Adeleke

Posted on

Create A Linux Virtual Machine/Install Nginx

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.

Image description

Step 2 :

Create or use an existing resource group

Step 3 :

Give the virtual machine a name - 'Linuxvm'

Image description

Step 4 :

Image- choose Ubuntu server

Step 5 :

create your username and password

Step 6 :

Choose a size (standard D2as_v4)

Image description

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)

Image description

Step 9 :

Move to Monitoring and 'disable' diagnostic. Then click review and create

Image description

Step 10 :

Validation passed- Click create

Image description

Step 11:

Deployment in progress( Give it sometime)

Image description

Step 12 :

Deployment is completed. Click on "Go to resource"

Image description

Step 13 :

Click on connect and select Native SSH

Image description

wait for validation, also give it some time until it is configured

Image description

Step 14:

Open powershell on your computer and type in this command

ssh username@Ipaddress

Image description

Respond yes to continue

Step 15:

Type in your password

Image description

Step 16:

You need to be in root to continue or do anything on linux.

Type in the command

> sudo su

Image description

Step 17:

Now we install nginx with this command (Package manager)
`

apt install nginx
`

Image description

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.

Image description

Yippee💃 Well done mate.

I hope this is of great help to you.

Top comments (0)