Let's explore how we would set up a LAMP stack on a VM instance. LAMP is a stack of Linux, Apache, MySQL, and PHP:
- Connect to your Linux VM instance using SSH and update it. We will follow Debian 9 commands throughout this example:
sudo apt-get update
- Install Apache 2's PHP module:
sudo apt-get install libapache2-mod-php php
- To test the installation, enter your external IP address and you should see the Apache test page. You can copy the external IP from the list on the console page of VM instances. It should show the Apache starting page:
http://[EXTERNAL_IP]
- To verify that PHP and Apache are working ...