Azure CLI Revisited
- Ensure Azure CLI Tools extension is installed in Visual Studio Code
- Lets use Azure CLI to create a ubuntu VM
- Create a resource group
- Create a VM and execute the commands
- Refer Here for the changes made so far
- By default azure has a NSG rule which opens 22 port for communication
- Now lets open 80 port for communication as we will be installing lamp stack
- Manual Steps:
sudo apt update
sudo apt install apache2 -y
sudo apt install php libapache2-mod-php php-mysql php-cli -y
# Create a file with content <?php phpinfo(); ?>
/var/www/html/info.php
sudo systemctl restart apache2
- Refer Here for the azure CLI
- Exercise: Create a Centos VM from Azure CLI and install lamp stack
sudo yum install httpd -y
sudo systemctl enable httpd
sudo yum install php php-mysql php-fpm -y
# Create a file with content <?php phpinfo(); ?>
/var/www/html/info.php
sudo systemctl restart httpd
- Exercise 1: Lets create a windows server
- Exercise 2: Spend some time on JMES Path Refer Here
az vm image list-publishers #publisher
az vm image list-offer # offer
az vm image list-sku # sku
az vm image list # version
az vm image show
Like this:
Like Loading...