In this lab you use Google Cloud Launcher to quickly and easily deploy a LAMP (Linux, Apache HTTP Server, MySQL, and PHP) stack on a Compute Engine instance.
To complete this lab, you need:
Access to a supported Internet browser:
A Google Cloud Platform project
In this lab, you:
In this lab, you deploy a fully-integrated and ready to run LAMP development environment to a Compute Engine instance.
Bitnami LAMP Stack provides a complete PHP, MySQL and Apache development environment for Linux that can be launched in one click. It also bundles phpMyAdmin and more.
Apache HTTP Server
Web application framework
PHP administration tool
For more information on the Bitnami LAMP stack, see: https://bitnami.com/stack/lamp.
Before you can launch virtual machines using Google Compute Engine in a project, you must first enable the Compute Engine API in that project if it is not already enabled. To confirm that the Compute Engine API is enabled:
Confirm that, in the top bar of the Google Cloud Platform Console, cp100 is displayed as the current project. If you see a different project name, click that name, then click on cp100 in the Select dialog that appears.
In the Cloud Platform console, click the top left three-bar icon to open the Products & Services menu. The console's online help and documentation refer to this menu as the "left-side menu."
In the left-side menu, click APIs & Services > Dashboard.
Click Enable APIs and Services.
In the search bar, type: Compute Engine
Click Google Compute Engine API in the search results.
If you see a Disable button at top, the Compute Engine API is already enabled. Do not click the Disable button. Instead, skip to the "Using Cloud Launcher" section below.
Otherwise, you will see an Enable button at top. The presence of this button means that the Compute Engine API is not presently enabled in this project, so you must enable it now. Click the Enable button.
Wait for the operation to complete. Several minutes may be required. The operation is complete when the Disable button appears, together with several graphs of usage (all blank, because the Compute Engine API has just been enabled). Do not click the Disable button. Instead, proceed to the "Using Cloud Launcher" section below.
To deploy a LAMP stack using Google Cloud Launcher:
In the left-side menu, click Cloud Launcher.
In the search bar, type: LAMP.
Click the LAMP by Bitnami.
On the LAMP page, click Launch on Compute Engine.
When the New LAMP deployment page opens, accept all of the default deployment options. You may change the Zone in which your LAMP stack will be deployed if you wish.
If you are shown a ‘‘Welcome to Deployment Manager' window, click Close to dismiss it.
The status of the deployment appears in the console window. You see the status of the various components being deployed. When the deployment of the infrastructure is complete, the status changes to "lampstack-1 has been deployed". Once the software has been installed, you see a summary of the details for the instance, including the site address.
To verify the deployment of your LAMP stack:
When the deployment is complete, click the link in the Site address field at the top of the lampstack page. Alternatively, you can also use the button labeled ‘Visit the site' in the ‘Get started with LAMP' section of the page.
A new browser tab should open displaying a congratulations page indicating the Apache HTTP Server is running.
Close the congratulations tab.
On the Cloud Platform Console page, underneath ‘Get started with LAMP', click SSH.
In the SSH window, type the following command to switch to the bitnami directory.
Type the following command to copy the
phpinfo.php script from the installation directory to a publicly accessible location under the Web server document root.
sudo cp docs/phpinfo.php apache2/htdocs
Type the following command to close the SSH window.
Open a new browser tab.
Type the following URL. Replace
<site-address> with the URL in the Site address field. You can find the Site address at the top of the lampstack page.
A summary of the PHP configuration of your server is displayed.
Close the phpinfo tab.
To remove the resources created in this lab:
In the deployment summary page of the Cloud Platform Console, to the right of ‘lampstack-1', click Delete.
In the ‘Delete deployment' dialog, click Delete to confirm your choice.
Leave the Google Cloud Platform Console tab open.
©Google, Inc. or its affiliates. All rights reserved. Do not distribute.