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 Preview
  • 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 Preview
        • Lets add an inbound rule for 80 port Preview Preview Preview Preview
  • 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. Preview

Leave a Reply

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

Please turn AdBlock off
Plugin for Social Media by Acurax Wordpress Design Studio

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube