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.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay