Note: Please go to to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > ServerTemplates > Infinity > ST > LAMP All-In-One (v14 Infinity) > LAMP All-In-One (v14 Infinity) - Tutorial

LAMP All-In-One (v14 Infinity) - Tutorial

Table of Contents    

Long Term Support

Stable, tested ServerTemplate assets

   ►   Tutorial


To set up an example LAMP (Linux, Apache, MySQL, PHP) all-in-one server with your own application and database in a public/private cloud that can be used for production purposes, with continuous backup support.


  • 'actor', 'designer', and 'library' user role privileges
  • PHP application code that is accessible via a Git or SVN repository, or as a tarball (.tgz) saved in an ROS container. See Sample Files below.
  • For this tutorial we will be using a MySQL 5.5 dump file which is included with the above PHP application code. See Sample Files below.
  • For Amazon EC2, CloudStack, and other clouds that support security groups, you must have a security group defined with TCP port 22 open for SSH access and port 80 for client HTTP access.
  • A deployment into which you are going to add the server. See Create a New Deployment. See Create a New Deployment.


This tutorial describes the steps for launching a production-ready LAMP server in the cloud.

Before starting the tutorial it is strongly recommended that you read the ServerTemplate's Overview page, which will provide a technical overview of the ServerTemplate's overall functionality.


Sample Files

For this tutorial, we have provided a git repository which contains both the application and the database dump required to go through all the necessary steps.  

Add a Server

  1. Create a new deployment. See Create a New Deployment.
  2. Go to Design > MultiCloud Marketplace > ServerTemplates and import the most recently published revision of the desired ServerTemplate.
  3. You can use the published revision of the ServerTemplate to launch your LAMP server. However, if you plan to customize the ServerTemplate, clone the template to create an editable version that you can modify.
  4. Add a server to the new deployment using the imported (or cloned) ServerTemplate. See Add Server Assistant for details. 

Create Credentials

Credentials are a way of passing sensitive information to a script (as an input) in a discrete manner without making the actual value visible in the Dashboard. It is considered a best practice to use credentials to store sensitive information. If the following credentials do not already exist in the RightScale account, you should create them now. Requires 'designer' or 'admin' user role privileges. See Create a New Credential.

If you do not want to create credentials for storing these values, you can enter them as text values later in this tutorial when you define the inputs.

  • DBADMIN_PASSWORD - Password of a database user with admin-level privileges.
  • DBAPPLICATION_PASSWORD - Password of a database user with user-level privileges.
  • DBAPPLICATION_USER - Username of a database user with user-level privileges.

Define Inputs

The next step is to define any missing inputs. It is recommended that you define any missing inputs at the deployment level for inheritance and consistency reasons.

This particular ServerTemplate contains scripts that retrieve a PHP application and database dump file and application code at boot time. In order for the scripts to successfully retrieve the files you will need to provide necessary information. 

Under the deployment's Inputs tab, click Edit.

Click the Show all Advanced text link to view the exhaustive list of inputs for all categories.



Input Name Description Example Value
MySQL Application Password The password for the MySQL database.  This will allow the application to access the database.


MySQL Database Name

The database name/schema of the MySQL dump file.

text: app_test

MySQL Application Username The user for the MySQL application.  This allows the application to access the database. cred: DBAPPLICATION_USER
Application Repository URL The repository location to download the application from.  For example: git:// text: git://
Application Repository Revision The revision of the application to download from the repository. text:  unified_php
Input Name Description Example Value

MySQL Root Password

The root password for the MySQL server.


MySQL Database Name

The database name/schema of the MySQL dump file.

Important! Use the same value that's specified for the MySQL Database Name input specified in the ‘RS-APPLICATION-PHP’ category above.
text:  app_test

MySQL Application Password

MySQL Application Username

Username and password of a database user with administrator privileges. The admin username and password are used for tasks that require administrator access to the database.



Input Name Description Example Value
Dump File

Path to the mysql dump file to be imported.

text: app_test.sql.gz


When you are finished defining the inputs, click Save.

Launch the Server

Now that you have finished defining server details, you are ready to launch a server in the cloud with the new settings. Click the server's Launch button.

Review the inputs that you set at the Inputs confirmation page and click Launch.

Post Tutorial Steps

Test the Server

After the server enters the operational state, you can test it to ensure that it was properly configured. To test your server, go to the server's Info tab. You can either copy and paste the server's public IP address into a web browser or click the public DNS name or IP address link (if available).

  • For an Amazon EC2 server, click the "Public DNS name" link (see below)
  • For servers launched in other clouds, use the "(Public) IP Address"




When you navigate to your running LAMP server in a web browser, you will see your application's default page. Aside from the default page, the application in this example also responds to two other test urls.  After the ip, type in /serverid and a page showing the server’s ip should come up.  Type /dbread, to read sample entries directly from mysql database. If all went well, you should see ‘app_test1: I am in the db’.


If the server is operational but you cannot view the test page in a browser window, make sure your server's security group has port 80 open.

You should also click on the server's Monitoring tab to view real-time monitoring graphs and check out the detailed server information under the Audit Entries tabs.

Terminate the Server

When you finish testing, click Terminate to shutdown the server.

You must to post a comment.
Last modified
15:16, 27 Jan 2015



This page has no classifications.



© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.