Abstract: Free use of cloud services, zero threshold fast cloud site, really have a hand on the line!

Tutorial looked and looked, want to build an exclusive website of their own, how a learning will, do waste? How to set up a WordPress website on huawei Cloud Elastic server in an easy time?

Let’s take a look at the overall idea of building a website. To complete the construction of a website application, we need to operate the following 5 steps: create shared bandwidth, so that our projects deployed to the cloud can access; Then create required security groups, virtual private clouds, and elastic cloud servers. Build LAMP environment; The database used to create the site; Finally, the site is set up.

1. Create a shared bandwidth

When deployed in huawei cloud project need access to or need to provide services, public broadband connections can choose exclusive or Shared broadband, high load without pressure and flow for the business requirements, we will with multiple elastic public IP to bind to the same Shared bandwidth, makes the resources to maximize use of bandwidth and save money, So we need to create a shared bandwidth with a certain bandwidth. On the Bandwidth Sharing page, purchase the required bandwidth.

2. Create security groups, virtual private clouds, and elastic cloud servers

As a virtual firewall, a security group provides status monitoring and packet filtering functions. To ensure that ECS and RDS services can be successfully and securely provided to the outside world, we need to create a security group. It is relatively easy to create a security group. You only need to set the name of the security group and use the default universal Web server to complete the creation.

A virtual private cloud is an isolated and private virtual network environment. You can configure self-serving IP address segments, subnets, and security groups in a VIRTUAL private cloud (VPC), and apply for elastic bandwidths and elastic IP addresses to build service systems. We can set network segment 192.168.0.0/16 and sub-network segment 192.168.0.0/16 and 192.168.0.0/24 respectively.

After security groups and virtual private clouds (VPCS) are configured, an elastic cloud server (ECS) can be created. An elastic cloud server consists of cpus, memory, images, and cloud disks, which are available at any time, flexible, and scalable. It also combines virtual private clouds, virtual firewalls, and computing servers that can store multiple copies of data. We use X86 cpus to build the website. On the huawei Elastic cloud server purchase page, you can configure the website by referring to the following parameters:

After confirming the configuration parameters, set the login account and password of the server, and click Buy Now to create the ECS. Complete the service purchase and configuration of our website application.

Three, build environment preparation

In environment preparation, we need to set up LAMP environment, which refers to Linux operating system, ApacheHTTP server, MySQL database and PHP open source software. Here we can install LAMP by running the following yum source command:

yum install -y httpd php php-fpm php-server php-mysql mysql

After installing the LAMP environment, you can download the WordPress installation software. Here we can download and decompress it by using the following wget command:

Sandbox-experiment-resource.obs-website.cn-north-1.myhwclouds.com/30min-websi wget – c…

Unzip WordPress installation software:

Tar -zxvf wordpress-4.9.1-zh_cn.tar. gz -c /var/www/html

To complete decompression, run the command as shown in the following figure.

After decompressing the WordPress installation software, enter the following code to enable read and write permissions to the installation package directory and enable HTTPD service and phP-fpm service.

Run the following code to grant read and write permissions to the directory where the file resides:

chmod -R 777 /var/www/html

Enable HTTPD service:

systemctl start httpd.service

Enable php-fpm service:

systemctl start php-fpm.service

After the preceding two services are enabled, you can run the code to check the status. If the status is Active (running) and the status is steady green, the service is running.

Check the HTTPD service status:

systemctl status httpd

Check the php-fpm service status

systemctl status php-fpm

Finally, set the HTTPD service and phP-FPM service to boot to complete the setup environment.

Set HTTPD service to boot:

systemctl enable httpd

To set the phP-Fpm service to boot:

systemctl enable php-fpm

The database used to create the website

After confirming the open state, we need to create the database that our website needs to use, which is used to store website data. Huawei Cloud Relational database is an online relational database service based on cloud computing platform, which can be used out-of-the-box, stable, reliable, flexible, and easy to manage. RDS of the following configurations can be purchased when building website applications:

After setting the parameters, click “Buy Now” to log in to the database and run the following command to create a WordPress database. Now we are ready for the final step of setting up our WordPress site!

create database wordpress;

Five, website Settings

Enter the WordPress page, bind the host IP and port of the database created, and set up the login account to install WordPress. So far, we have successfully built the WordPress website!

After reading the above guidance, I am eager to try it. Now I have a free opportunity to experience it for you. Go to Huawei Cloud Sandbox Lab! Don’t worry about the high cost of cloud service, don’t worry about operation error, directly start the operation of the site. One-key environment preset, one-key release, nanny level experiment manual easy guidance, real-time dynamic monitoring of experimental progress, a chicken eating time, you can easily build your own exclusive website! Get started and experience the sandbox experiment of “Easy To Build website application in 30 minutes”!

→ Click direct to Huawei Cloud Academy, get more new skills!

This article is shared from huawei cloud community “Free cloud construction website application, as soon as possible!” , original author: College assistant.

Click to follow, the first time to learn about Huawei cloud fresh technology ~