This article will walk you through how to deploy LAMP (Linux, Apache Web Server, MySQL and PHP) on Azure cloud.

Configuration using Ubuntu Gallery Image:

This was a traditional way of LAMP deployment on Azure environment. It is still a preferred option opted with self-management infrastructure.

  1. Go to http://azure.microsoft.com/en-us/ and subscribe for subscription
  2. Click on Portal / Go to https://manage.windowsazure.com/ and Sign In using Windows Live ID.
  3. Successful Login Preview
  4. Click on the NEW button in the lower left corner. Go to NEW ➤ COMPUTES ➤ VIRTUAL MACHINE ➤ FROM GALLERY
  5. Select Ubuntu
  6. Give Virtual Machine a name, Select Tier Type, Size of VM, provide a user name and password
  7. Note: For SSH authentication generate and upload system certificate.
  8. Configure VM
    1. Select region
    2. Add HTTP endpoint
  9. Click next and wait for VM to be provisioned.

Configure New VM using Template with PowerShell Commands:

    1. Create Group$azure group create uniqueResourceGroup westus
    2. Create VM$azure group deployment create –template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/lamp-app/azuredeploy.json uniqueResourceGroup uniqueLampName

Configure New VM using Template with PowerShell Commands:

  1. Execute any one of the following
    • On Linux
      • $ sudo apt-get update
    • Individual Packages
      • $ sudo apt-get install apache2 mysql-server php5 php5-mysql
    • Using Tasksel
      • $ sudo apt-get install tasksel
      • $ sudo tasksel install lamp-server
  2. Verify PHP extension
    • $ apt-cache search php5
  3. Restart Apache web server
  4. Verify installation

Leave a Comment