El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Building the Website

Updated on 2024-04-17 GMT+08:00

Requested Cloud Resources

Building Process

Obtaining the Software

  1. WinSCP

    WinSCP is a free and open-source SFTP, FTP, WebDAV and SCP client for Microsoft Windows. It is mainly used to transfer files between a local and a remote computer in a secure manner. Download the required version of WinSCP.

  1. Discuz X3.5 (UTF-8)

    Discuz X3.5 (UTF-8) is used to deploy website applications. Download the software package of the required version from the official website.

    NOTE:
    • The recommended English version of Discuz X3.5 (UTF-8) is not free of charge. Refer to the provided page for payment details.
    • The software packages are only used to construct the forum. To deploy a commercial website, download the applications as needed.

Building the Database

Install MySQL.

CentOS 7.2 is used as an example to describe how to install MySQL.

  1. Log in to ECS discuz01 remotely and enter the username and password.
  2. Install MySQL.

    wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

    yum -y install mysql57-community-release-el7-10.noarch.rpm

    yum -y install mysql-community-server --nogpgcheck

Configure MySQL.

  1. Start and enable MySQL.

    systemctl start mysqld

    systemctl enable mysqld

  2. Query the running status of MySQL.

    systemctl status mysqld.service

    Information similar to the following is displayed:

    # systemctl status mysqld.service
    ● mysqld.service - MySQL Server
       Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
       Active: active (running) since Mon 2021-08-23 10:54:55 CST; 7s ago
         Docs: man:mysqld(8)
               http://dev.mysql.com/doc/refman/en/using-systemd.html
     Main PID: 7873 (mysqld)
       CGroup: /system.slice/mysqld.service
               └─7873 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
    
    Aug 23 10:54:49 ecs-adc3-420652-aed6 systemd[1]: Starting MySQL Server...
    Aug 23 10:54:55 ecs-adc3-420652-aed6 systemd[1]: Started MySQL Server.
  3. Obtain the password of user root, which was automatically set during MySQL installation:

    grep 'temporary password' /var/log/mysqld.log

    Information similar to the following is displayed:
    2021-08-16T11:33:37.790533Z 1 [Note] A temporary password is generated for root@localhost: ;8nPd29lhs,k
  4. Harden MySQL.

    mysql_secure_installation

    Securing the MySQL server deployment.
    
    Enter password for user root:    #Enter the obtained password of user root.
    The existing password for the user account root has expired. Please set a new password.
    
    New password:  #Enter the new password.
    
    Re-enter new password:   #Enter the new password again.
    The 'validate_password' plugin is installed on the server.
    The subsequent steps will run with the existing configuration of the plugin.
    Using existing password for root.
    
    Estimated strength of the password: 100
    Change the password for root ? ((Press y|Y for Yes, any other key for No) : N   #Asks you whether to change the password of user root. Press N.
    
     ... skipping.
    By default, a MySQL installation has an anonymous user,
    allowing anyone to log into MySQL without having to have
    a user account created for them. This is intended only for
    testing, and to make the installation go a bit smoother.
    You should remove them before moving into a production
    environment.
    
    Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y   #Asks you whether to remove anonymous users. Press Y.
    Success.
    
    Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network.
    
    Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y   #Asks you whether to forbid remote login of user root. Press Y.
    Success.
    
    By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment.
    
    Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y   #Asks you whether to delete the test database and cancel access permissions to it. Press Y.
     - Dropping test database...
    Success.
    
     - Removing privileges on test database...
    Success.
    
    Reloading the privilege tables will ensure that all changes
    made so far will take effect immediately.
    
    Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y   #Asks you whether to reload privilege tables. Press Y.
    Success.
    
    All done!
  5. Enter the password of user root to log in to the database.

    mysql -u root -p

  6. Set the MySQL database as the default database.

    use mysql;

  7. Query the user list.

    select host,user from user;

    NOTE:

    This command and the following database commands must end with a semicolon (;).

  8. Refresh the user list and allow all IP addresses to access the database.

    update user set host='%' where user='root' LIMIT 1;

  9. Forcibly update the permissions to allow ECSs in the same subnet to access the MySQL database using private IP addresses.

    flush privileges;

  10. Exit the database.

    quit

  11. Restart MySQL.

    systemctl restart mysqld

  12. Enable MySQL to automatically start upon system boot.

    systemctl enable mysqld

  13. Disable the firewall.

    systemctl stop firewalld.service

  14. Check the firewall status.

    systemctl status firewalld

Setting Up the Web Environment

Install the web environment.

  1. Unbind the EIP from ECS discuz01 and bind it to ECS discuz02.

  2. Log in to ECS discuz02 remotely and enter the username and password.
  3. Install MySQL.

    wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

    yum -y install mysql57-community-release-el7-10.noarch.rpm

    yum -y install mysql-community-server --nogpgcheck

  4. Install the Apache HTTP Server (httpd), PHP FastCGI Process Manager (php-fpm), MySQL client (mysql), and MySQL server (mysql-server).

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

    If the following information is displayed, the installation is successful.
    Complete!
  5. Reinstall the Apache HTTP Server (httpd), PHP FastCGI Process Manager (php-fpm), MySQL client (mysql), and MySQL server (mysql-server).

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

    If the following information is displayed, the installation is successful.
    Complete!

Configure the web environment.

  1. Start httpd.

    service httpd start

  2. Enable httpd to automatically start upon system boot.

    chkconfig httpd on

  3. Start php-fpm.

    service php-fpm start

  4. Enable php-fpm to automatically start upon system boot.

    chkconfig php-fpm on

  5. Disable the firewall.

    systemctl stop firewalld.service

  6. Check the firewall status again.

    systemctl status firewalld

  7. Start MySQL.

    systemctl start mysqld

  8. Enable MySQL to automatically start upon system boot.

    systemctl enable mysqld.service

  9. Enter http://EIP in a browser to query the default page of the ECS.

Deploying the Website Code

  1. Decompress the Discuz_X3.5_SC_UTF8_20231001.zip package to the Discuz_X3.5_SC_UTF8_20231001 folder.
  2. Use WinSCP to upload the upload file in the Discuz_X3.5_SC_UTF8_20231001 folder to the /var/www/html directory on ECS discuz02. For details, see WinSCP documents.
  3. Log in to discuz02 and run the following command to grant the write permission to other users:

    chmod -R 777 /var/www/html

  4. Enter http://Elastic IP address in the address bar of a browser. Follow the installation wizard to install Discuz.
    • The database address if the private IP address of discuz01.
    • The database password is the password of the database administrator's root account configured on discuz01.

Verifying the Website

In the browser address bar, enter http://Elastic IP address/forum.php. If the forum homepage is displayed, the website is successfully built.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback