This topic describes how to build a Drupal-based website on an ECS instance that runs CentOS 7.


You must have an Alibaba Cloud account before you follow the instructions provided in the tutorial. To create an Alibaba Cloud account, click Create an Alibaba Cloud account.

Background information

Drupal is a free and open source content management framework (CMF) written in Hypertext Preprocessor (PHP). Drupal consists of a content management system (CMS) and a PHP development framework. You can use Drupal to build dynamic websites that provide various features and services, and to support website projects in different applications from personal blogs to large communities.

The procedure described in this topic is applicable to users that are familiar with Alibaba Cloud ECS instances and Linux, but new to website construction with ECS instances.


To build a Drupal-based website on an ECS instance, follow these steps:
  1. Step 1: Activate an ECS instance
  2. Step 2: Build the Web environment
  3. Step 3: Install Drupal

Step 1: Activate an ECS instance

You can activate an ECS instance to build a personal website. In the follow-up management, you can upgrade the instance or optimize the architecture as needed.

Step 2: Build the Web environment

You can build the Web environment on the ECS instance in any of the following ways:
  • Image deployment
  • Easy deployment with an installation package
  • Manual deployment: Build the environment by using source code or Yellowdog Update, Modified (YUM).

We recommend that you use an image. This is an easy way to build the Web environment for the first time. If you have some basic knowledge of Linux operations and maintenance, you can use an installation package, the source code, or the YUM utility to customize the Web environment. This topic describes how to build the Drupal website by using an image.

  1. When you create an ECS instance, in the Image section, choose Marketplace Image > Select from image market including operating system. For more information, see Create an ECS instance.
  2. Type LAMP in the search bar, click Search, and then select the first matched image in this example.
  3. Click Continue.

    You can also go to Alibaba Cloud Marketplace, and search for and purchase the required images.

    In this topic, the software versions used in the environment include: CentOS 7.2 | Apache 2.4.25 | MySQL 5.7.17 | PHP 7.1.1 |Drupal8.1.1.
    Note The versions that you download may be different in your actual running environment.

Step 3: Install Drupal

To install Drupal, follow these steps:

  1. Download the Drupal installation package.
    # wget
  2. Decompress the package to your website root directory.
    # unzip 
    # mv drupal-8.1.1/* /var/www/html/
  3. Download the Chinese translation package.
    # cd /var/www/html/
    # wget -P profiles/standard/translations
  4. Specify the owner and group of the sites directory.
    # chown -R apache:apache /var/www/html/sites
  5. Restart the Apache service.
    # /etc/init.d/httpd restart
  6. Open your browser, and in the address bar, enter the URL "Public IP address of the ECS instance/index.php" to go to the Drupal installation page. Select the required language from the Choose Language drop-down list, and click Save and continue.
  7. Select Standard, and click Save and continue.
  8. Enter database information, and click Save and continue.
    Note After you log on to the MySQL database, you can run the following commands to customize the database information:
    • DBNAME: database name
    • UAERNAME: username
    • IP: localhost or for a local host
    • YOURPASSWORD: database password
  9. At the end of automatic installation, go to the website settings page, enter site information, and then click Save and continue.

What to do next

Afterward, you can customize your website pages.