Azure VM Contd
- Activity 1: Create a Ubuntu Linux VM with Size Standard_B1s
- Steps:
- Create a New Resource Group
- Create the vm using portal

- Steps:
- Activity 2: Login into the vm and install the apache and php
- Steps:
- SSH into VM
- Execute the following commands
sudo apt update sudo apt install apache2 -y sudo apt install php libapache2-mod-php php-mysql -y # Create a file in /var/www/html/info.php "<?php phpinfo(); ?>" echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php- Now access the application using
http://<public-ip>andhttp://<public-ip>/info.php- Unable to access the application as http uses port 80 on TCP Protocol and it is not open in NSG

- Lets add an inbound rule for 80 port

- Unable to access the application as http uses port 80 on TCP Protocol and it is not open in NSG
- Steps:
- Activity 3: Make a note of public ip address and private ip address of the virtual machine. Stop the Virtual Machine.
- Create a new Centos Based Linux Virtual machine with Size Standard_B1s
- Once the Machine is created
- Start the stopped VM and compare the private and public ip address with the noted values.
- Observation: Public ip addresses change and private ip remains the same
- If you want the static ip addresses for public ip then we need to opt for it. This involves cost.

