Deploy an LNMP environment by using an extension

更新时间:
复制 MD 格式

This topic describes how to use an extension provided by CloudOps Orchestration Service to quickly deploy an LNMP environment. The extension automates the installation, so you do not need to be familiar with the installation details.

Note

For batch installations, log on to the CloudOps Orchestration Service console. In the navigation pane on the left, choose Server Management > Extensions, and then select One-click LNMP Installation.

Prerequisites

  • An inbound rule that allows traffic on port 80 has been added to the security group. For more information, see Add a security group rule.

  • To use this feature, your instance must meet the following conditions.

    • The ECS instance is in the Running state.

    • A public IP address is automatically assigned to the ECS instance. Alternatively, an elastic IP address (EIP) is associated with the ECS instance. For instructions on how to enable public bandwidth, see Enable public bandwidth.

    • The Cloud Assistant agent is installed on the ECS instance and is in the Normal state.

  • If you use a Resource Access Management (RAM) user, grant the user least privilege access. Create a custom policy with the following content to follow the principle of least privilege.

    Custom Permissions JSON

    {
      "Version": "1",
      "Statement": [
        {
          "Effect": "Allow",
          "Action": "bssopenapi:GetOrderDetail",
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "ecs:DescribeCloudAssistantStatus",
            "ecs:DescribeInstances",
            "ecs:DescribeInvocationResults",
            "ecs:DescribeInvocations",
            "ecs:RunCommand"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": [
            "oos:GetTemplate",
            "oos:ListInstancePackageStates",
            "oos:StartExecution",
            "oos:UpdateInstancePackageState"
          ],
          "Resource": "*"
        },
        {
          "Effect": "Allow",
          "Action": "oss:GetObject",
          "Resource": "*"
        }
      ]
    }

Procedure

  1. Log on to the ECS console - Instances. Click the ID of the target ECS instance to open its details page.

  2. On the ECS instance details page, choose Scheduled and Automated Tasks > Install/Uninstall Extension > Install Extension.

  3. In the Install Extension dialog box, set Extension to Install to Public Extension. Find and select One-click LNMP Installation from the drop-down list. Then, click Next and follow the on-screen instructions.image

    When the task status changes to Completed, the LNMP environment is deployed.

    Note

    To find the password for the MySQL root user, view the task details of the extension. The password is in the extended information.

  4. On your local computer, open a browser and navigate to http://<Public IP address of the ECS instance>/phpinfo.php to verify the installation.

    Note

    To access the ECS instance from the internet, ensure that an inbound rule of the security group allows traffic on port 80.

    phpinfo