This topic describes how to use Drupal to deploy an e-commerce website on a CentOS 7 ECS instance.
Prerequisites
- An Alibaba Cloud account is created. To create an Alibaba Cloud account, go to the Sign up to Alibaba Cloud page.
- An ECS instance that has a public IP address is created and deployed with a LAMP environment. For more information, see Build a LAMP stack on a CentOS 7 instance.
Background information
Drupal is an open source content management framework (CMF) written in 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. Drupal is commonly used in a variety of applications, from personal blogs to large communities.
This topic is intended for users who are familiar with Linux, but new to web development on Alibaba Cloud ECS instances. You can also build a Drupal website based on an Alibaba Cloud Marketplace image. For more information, see Build a Drupal website based on an Alibaba Cloud Marketplace image.
Configuration
The following instance configurations and software versions are used in the example. The operations may vary depending on your instance configurations and software versions.
- Instance type: ecs.c6.large
- Operating system: CentOS 7.8 64-bit
- Apache HTTP Server: 2.4.6
- MySQL: 5.7.31
- PHP: 7.0.33
- Drupal: 8.1.1
Configure the database information
- Use a local browser to access http://<Public IP address of the instance>/phpMyAdmin.
- Use the username and password of a MySQL database to log on to phpMyAdmin.
- At the top of the page, click SQL.
- Create a database and user for Drupal.Enter the following SQL statement in the editor:
Specify the parameters in the SQL statement:CREATE DATABASE <DrupalDBName>; CREATE user '<UserName>'@'<IP>' IDENTIFIED BY '<UserPassWord>'; FLUSH PRIVILEGES;
<DrupalDBName>
: Specify a name for the database.<UserName>
: Specify a user for the database.<IP>
: Specify the IP address of the local host or 127.0.0.1.<UserPassWord>
: Specify a password for the database.Note You can execute theshow variables like 'validate_password%';
SQL statement to query the password strength rules for the database.
- Click Go.
Install Drupal
- Connect to an ECS instance in which an LAMP environment is deployed.For more information about the remote connection methods, see Connect to a Linux instance by using a password.
- Download and configure Drupal.
- Use a browser to access the website and install Drupal.