- Documentation
Elastic Compute Service
Elastic Compute Service
Best Practices
Self-service website creation
Building websites
Setting up a Drupal website
Building websites
Setting up a Drupal website
Setting up a Drupal website
Drupal is an open-source content management framework written in PHP, consisting of a content management system and a PHP development framework. Drupal integrates powerful and freely configurable features, supporting website projects ranging from personal blogs to large community-driven sites and other various application types.
Software versions
- Operating system: In the example provided in this topic, CentOS 7.6 is used.
- Apache: A web server with stable performance. In the example provided in this topic, Apache 2.4.6 is used.
- MySQL/MariaDB: A database management system. In the example provided in this topic, MySQL 14.14 is used.
- PHP: A server-side scripting language embedded in HTML documents. In the example provided in this topic, PHP 7.0.33 is used.
- Drupal: In the example provided in this topic, Drupal 8.1.1 is used.
Prerequisites
Step 1: Create a database for Drupal
- Execute the following command to access the MySQL database as the root user. The password of the root user is the one you specified during MySQL configuration.
- Execute the following command to create a database for Drupal.
- Create a user for the database created for Drupal.
- Grant all permissions to the user.
- Execute the following command to make the preceding commands take effect.
- Execute the following command to exit the MySQL database.
Step 2: Download and configure Drupal
- Execute the following command to download Drupal.
- Execute the following command to decompress the Drupal installation package.
- Execute the following command to move the Drupal files to the website root directory.
- Execute the following command to enter the website root directory of Drupal.
- Execute the following command to download the Chinese translation package.
- Modify the Drupal configuration file.
- Execute the following command, and press the i key to enter the edit mode.
- Change the AllowOverride None setting in the specified location in the following figure to AllowOverride All.
-
- Press Esc, enter :wq, and press Enter to save and exit the file.
- Execute the following command to modify user permissions on the website root directory.
- Execute the following command to restart the Apache service.
Step 3: Install Drupal
- In your local browser, enter http://<ECS instance EIP>/drupal to access the Drupal website.
- Select the installation language, and click the "Save and Continue" button.
- Select the standard installation method, and click the "Save and Continue" button.
- Wait until the website and the translation package are installed. Then, configure the website information based on your business requirements and click the "Save and Continue" button.
- After the installation is complete, you are automatically logged in to the website. You can specify custom settings for the website based on your business requirements.
Step 4 (Optional): Enable HTTPS for the website.
When a user accesses your website over the HTTP protocol, the browser warns the user that the connection is not secure. We recommend that you enable HTTPS secure communication for your website. This ensures encrypted data transmission between users and your website, effectively defending against network hijacking, information leakage, and other threats.
Last updated: 2026.06.18 19:52:58