Deploy a Drupal website with an Alibaba Cloud Marketplace image

Updated at:

Deploy a Drupal-based CMS website on an ECS instance with a pre-configured Alibaba Cloud Marketplace image.

Procedure

Step 1: Create an ECS instance using a Drupal image

Note

If you have an existing ECS instance without important data, you can replace the operating system with a Drupal image from Alibaba Cloud Marketplace.

  1. Go to ECS console - custom launch.

  2. On the Custom Launch page, configure the billing method, region, zone, and instance type.

  3. In the Images section, select Marketplace Images > Get more options from Alibaba Cloud Marketplace (including operating systems).

  4. In the search box, enter Drupal, click Search, and select an image.

    Click the image title in the search results to view the image configuration details. Sample configuration:

    • Operating system: Alibaba Cloud Linux 3

    • Nginx: 1.26.2

    • MySQL: 8.0.40

    • PHP: 8.3

    • Drupal: 11.0.9

    • phpMyAdmin: 5.2.1

    • Drupal: 11.0.9

    Note
    • If you require a specific operating system version, select a matching Alibaba Cloud Marketplace image.

    • Note the image pricing. If the image shows ¥0/hour, it is free of charge.

    • See Drupal Image User Guide.

    image

  5. Click Use.

  6. Configure remaining parameters as prompted. Note the following parameters. See Create an instance using the wizard.

    • Images: The Images section is auto-filled with your selected Alibaba Cloud Marketplace image.

    • Public IP Address: Select Assign public IPv4 address and set the bandwidth as needed.

  7. In the security group of the ECS instance, add a rule to allow inbound traffic on TCP ports 80 and 3306.

Step 2: Create a database and install Drupal

  1. Obtain the MySQL credentials.

    1. Connect to the ECS instance. See Log on to a Linux instance using Workbench.

    2. Obtain the MySQL credentials:

      sudo cat /root/ReadMe
      [root@iZ2zef9oy4    ne4u4Z ~]# sudo cat /root/ReadMe
      ################################################################
      #       For more information please visit https://weiliu.cn    #
      ################################################################
      
      MySQL root password: YJ    ZX
      
      FTP account: ftpxxxr
      FTP password: I#xxxod1
      
      Online documentation:
      https://weiliu.cn/docs/drupal/
  2. Create a Drupal database.

    1. Open http://<ECS instance public IP>/phpMyAdmin in your browser.

    2. Log on to phpMyAdmin with the MySQL credentials.

      On the phpMyAdmin login page, enter root as the Username, enter the password, and then click Log in.

    3. Create a Drupal database and user.

      1. At the top of the page, click SQL.

      2. Enter the following SQL, modify the parameters as needed, and click Run.

        • drupalDBName: The database name.

        • UserName: The database username.

        • IP: Use 127.0.0.1 for localhost.

        • UserPassWord: The database password.

        CREATE DATABASE drupalDBName;
        CREATE USER 'UserName'@'127.0.0.1' IDENTIFIED BY 'UserPassWord';
        GRANT ALL PRIVILEGES ON *.* TO 'UserName'@'127.0.0.1' WITH GRANT OPTION;
        FLUSH PRIVILEGES;
  3. Install Drupal.

    1. Open http://<ECS instance public IP> in your browser to access the Drupal installer.

      Select Chinese (Simplified) as the language and click Save and continue.

    2. Select a language and click Save and continue.

    3. Select Standard and click Save and continue.

    4. Enter the database information and click Save and continue.

      Select MySQL, MariaDB, or Percona Server as the Database type, and then enter the Database name, Database username, and Database password. To configure the database host or port, expand Advanced options.

    5. After installation completes, enter your site information on the configuration page and click Save and continue.

      Log on to your Drupal website to customize settings. See Drupal official documentation.

      image