Azure Classroom Series – 09/Oct/2021

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
  • 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> and http://<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
  • 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.

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%