×
Community Blog Build a Drupal Website Manually

Build a Drupal Website Manually

This article describes how to use Drupal to build an e-commerce website on a CentOS 7 ECS instance.

By Alibaba Cloud ECS Team

Prerequisites

• Create an Alibaba Cloud account. To create an Alibaba Cloud account, go to the Sign up to Alibaba Cloud page.

• Create an ECS instance with a public IP address and deploy it with a LAMP environment. For detailed information, refer to the Build a LAMP stack on a CentOS 7 instance.

Background Information

Drupal is an open-source content management framework (CMF) written in PHP. It includes a content management system (CMS) and a PHP framework. Drupal allows you to create dynamic websites with various features and services. It is widely used in applications ranging from personal blogs to large communities.

This article is designed for users who are familiar with Linux but new to web development on Alibaba Cloud ECS instances. Alternatively, you can also build a Drupal website using an Alibaba Cloud Marketplace image. For more information, refer to the Build a Drupal website based on an Alibaba Cloud Marketplace image.

Configuration

In this example, the following instance configurations and software versions are used. However, the actual 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.3.4

Configure the Database Information

1.  Access http://<Public IP address of the instance>/phpMyAdmin by using your browser.

You can find the public IP address of the instance in the IP Address column on the Instances page in the ECS console.

2.  Use the username and password of MySQL provided by the Alibaba Cloud Marketplace image to log on to phpMyAdmin.

3.  In the left-side navigation pane, click NEW. In the top navigation bar, click SQL.

4.  Create a database and user for Drupal.

Enter the following SQL statements in the field and configure the following parameters:

CREATE DATABASE <DrupalDBName>;
CREATE user '<UserName>'@'<IP>' IDENTIFIED BY '<UserPassWord>';
FLUSH PRIVILEGES;

Configure the following parameters in the SQL statement:

  • <DrupalDBName>: Specify a name for the database.
  • <UserName>: Specify a user for the database.
  • <IP>: Enter localhost or 127.0.0.1 if you perform the operations on your computer.
  • <UserPassWord>: Specify a password for the database.

Note: You can execute the SQL statement show variables like 'validate_password%'; to check the password strength rules for the database.

5.  Click Execute.

Install Drupal

1. Connect to an ECS Instance in Which an LAMP Environment Is Deployed

For more information about the remote connection methods, see Connect to an instance by using VNC.

2. Download and Configure Drupal.

a) Download the Drupal installation package.

cd
wget http://ftp.drupal.org/files/projects/drupal-8.1.1.zip

b) Decompress the Drupal installation package and move the installation files to the root directory of your Apache website.

yum install unzip -y
unzip drupal-8.1.1.zip
mv drupal-8.1.1/* /var/www/html

c) Download the Chinese translation package.

cd /var/www/html

wget -P profiles/standard/translations http://ftp.drupal.org/files/translations/8.x/drupal/drupal-8.26.zh-hans.po

d) Modify the owner and group of the sites directory.

chown -R daemon:daemon /var/www/html/sites

e) Restart Apache.

systemctl restart httpd

3. Use a Browser to Access the Website and Install Drupal

a) User a local browser to access <Public IP address of the ECS instance> and go to the Drupal installation page. Select the required language from the Choose Language drop-down list, and click Save and continue.

1

b) Select Standard, and click Save and continue.

c) Enter the information of the configured database, click Save and continue.

2

d) After the installation is complete, go to the website settings page, enter website information, and then click Save and continue.

What to Do Next

After the installation is complete, you can customize your website pages.

0 1 0
Share on

Alibaba Cloud Community

893 posts | 201 followers

You may also like

Comments

Alibaba Cloud Community

893 posts | 201 followers

Related Products