- Documentation
Elastic Compute Service
Elastic Compute Service
Best Practices
Self-service website creation
Building websites
Setting up a Discuz forum website
Building websites
Setting up a Discuz forum website
Setting up a Discuz forum website
Discuz is one of the most mature and widely adopted forum software systems in the world. It can be deployed on an ECS instance that supports Apache and MySQL databases to create your own website. This topic describes how to set up a Discuz forum website on a Linux instance.
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.
- Discuz: In the example provided in this topic, Discuz! 3.4 is used.
Prerequisites
Step 1: Set up a Discuz website
- Execute the following command to download the Discuz installation package. Log in to the Gitee official website to obtain the Discuz download address, and replace the link in the following wget command.
- Execute the following command to decompress the Discuz installation package. Replace download with the file name from the Discuz download address.
- Execute the following command to copy the contents of the "upload" folder to the /var/www/html directory.
- Execute the following command to grant write permission to other users.
- Execute the following command to download PHP-related modules.
- Execute the following command to start the PHP-FPM service.
- Execute the following command to restart the Apache service.
Step 2: Log in to the Discuz website
- In the local browser, enter http://<ECS instance EIP>/ to access the Discuz website.
- If the following output is displayed, Discuz is set up successfully.
- Click the "I agree" button to enter the installation wizard. Follow the onscreen instructions and click the "Next" button in sequence to go to the "Create database" page, where you can create a database for Discuz.
- Fill in the basic information for the database as shown in the following table. For any information not described in the following table, fill it in based on your business requirements.
- Click the "Next" button to complete the installation.
- Click the "Your forum has been installed. Click here to access the forum" button to enter the forum.
- The following page is displayed. You can use the administrator account and password you specified to log in to the forum.
Step 3: Resolve the Discuz domain name
You can configure a domain name for your website, eliminating the need to use a complex, less secure EIP to access it. You can perform the following steps to specify a domain name for the website.
- Apply for an ICP filing for your domain name.
- If your domain name points to a server located in the Chinese mainland, you need to apply for an ICP filing for your domain name. Otherwise, the website is not accessible.
- Configure domain name resolution.
- You need to resolve your domain name to the EIP to access your website.
- After you complete the preceding steps, you can enter http://<domain name> in your local browser to access the Discuz website.
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 17:48:26