Deploy a LAMP environment

更新时间:
复制 MD 格式

Resource Orchestration Service (ROS) allows you to install a LAMP environment with a single click by creating a stack.

Background information

The LAMP (Linux, Apache, MySQL, and PHP) architecture is a popular web framework. It includes the Linux operating system, Apache web server, MySQL database, and PHP programming language. All components are open-source software. The LAMP environment is versatile, cross-platform, high-performance, and low-cost.

The Deploy a LAMP (Linux+Apache+MySQL+PHP) environment template uses your existing resources, such as a virtual private cloud (VPC), vSwitch, and security group. By default, the template creates a CentOS system and installs necessary software, such as Apache, MySQL, and PHP. After you use the template to create a stack, you receive an ApacheWebURL. Use this URL to log on to the Apache management console.

Step 1: Create a stack

  1. Log in to the ROS console.

  2. In the left-side navigation pane, choose Templates > Public Templates.

  3. Find the Deploy a LAMP (Linux+Apache+MySQL+PHP) environment template.

    image

  4. Click Create Stack.

  5. On the Configure Parameters page, enter a Stack Name and configure the following parameters.

    Parameter

    Description

    Example

    Existing VPC Instance ID

    The VPC instance ID.

    For more information, see Create and manage a VPC.

    vpc-bp1m6fww66xbntjyc****

    vSwitch ID

    The ID of the vSwitch in the VPC.

    For more information, see Create and manage a vSwitch.

    vsw-bp183p93qs667muql****

    vSwitch Availability Zone

    The ID of the availability zone where the vSwitch resides.

    China (Hangzhou) Zone K

    Image

    The ID of the ECS image. centos_7 is used by default.

    For more information, see Image overview.

    centos_7

    Instance specification

    The instance type of the ECS instance.

    Select a valid instance type. For more information, see Instance families.

    ecs.c5.large

    System Disk Category

    The category of the system disk for the ECS instance. Valid values:

    • cloud_efficiency: ultra disk.

    • cloud_ssd: standard SSD.

    • cloud_essd: enhanced SSD (ESSD).

    • cloud: basic disk.

    • ephemeral_ssd: local SSD.

    For more information, see Disk overview.

    cloud_efficiency

    Instance Password

    The password for the ECS instance.

    Test_12****

    Database Name

    The name of the ApsaraDB RDS for MySQL database.

    For more information, see ApsaraDB RDS for MySQL overview.

    MyDatabase

    Database Username

    The username for the ApsaraDB RDS for MySQL database.

    DefaultUser

    Database User Password

    The password for the ApsaraDB RDS for MySQL database user.

    Test_23****

    Database Administrator Password

    The password for the ApsaraDB RDS for MySQL database administrator.

    Test_34****

  6. Click Create.

  7. On the Stack Information tab, view the status of the stack. After the stack is created, click the Output tab to obtain the ApacheWebURL.

  8. Access the ApacheWebURL to log on to the Apache management console.

Step 2: View resources

  1. In the navigation pane on the left, click Stacks.

  2. On the Stacks page, click the name of the target stack.

  3. Click the Resources tab to view resource information.

    The following table describes the resources in this example.

    Resource

    Quantity

    Resource description

    Specification description

    ALIYUN::ECS::Instance

    1

    Creates an ECS instance to install the LAMP service.

    • Total quantity: 1.

    • Instance type: ecs.c5.large.

    • Disk category: ultra disk.

    • System disk size: 40 GB.

    • Public IP address: Yes.

    ALIYUN::ECS::SecurityGroup

    1

    Creates a security group to control inbound and outbound traffic for the ECS instance in the group. This improves the security of the ECS instance.

    None

    Note

    For information about resource pricing, see the official pricing page or the pricing documentation for each product.