Create Linux Virtual Machine Using Azure Portal
Create Linux VM
- Go to azure portal
- On all resources click Create or use side bar > Virtual machines > Create
- Specify Resource Group
- Enter Virtual machine name: linuxvm
- Choose Image:
ubuntu server: 20.4
- Choose Authentication type: password
- Enter Username:
demouser
- Enter Password
- Choose Inbound port > SSH (secure shell) - This is the protocol you need to connect to linux
- Click Review and create
PuTTY
- PuTTY tool allows you to connect to the linux machine
- Download tool from
putty.org
- Open the tool
- Enter Hostname: Copy and paste the Public IP from Linux VM overview page
- Trust the host: Accept
- Enter username and password of the VM
Deploying Web Server on Linux
- Clear the screen:
clear
- Update package index:
sudo apt-get update
- Install nginx:
sudo apt-get install nginx
Add Inbound Port Rule
- Go to VM overview in portal
- Settings - Network - Add inbound port rule
- Webserver will be listening on http protocol port 80
- Choose Service:
http
- Click Add
- Open browser, copy and paste the Public IP to visit the default website