Used by over 2 million websites, Discuz! is the world’s most sophisticated and predominant forum software. This document describes how to set up a forum website using Discuz! on Tencent Cloud CVM instance and deploy the LAMP (Linux, Apache, MariaDB, and PHP) runtime environment it needs.
To manually set up a Discuz! website, you should be familiar with common Linux commands (see Installing Software via YUM under CentOS Environment), and understand the usage and version compatibility of the software to be installed.
The following software versions are used to build a Discuz! website.
Log in to the Linux instance using standard login method. You can also use any of the following login methods you are comfortable with:
Tencent Cloud hosts a software repository containing CentOS official releases, which provides the most stable version available currently. Use Yum to quickly install CentOS.
Run the following command to install Apache, MariaDB, PHP and Git:
yum install httpd php php-fpm php-mysql mariadb mariadb-server git -y
Run the following commands in sequence to start the services.
systemctl start httpd
systemctl start mariadb
systemctl start php-fpm
- Run the following command to set the password before your first login to MariaDB.
- When you see the prompt to enter the root password, click Enter to set the password. Your password will not be displayed by default. Complete other basic configurations as prompted.
Run the following command to log in to MariaDB. Enter the password you set in step 3 and click Enter.
mysql -u root -p
A successful login indicates that the configurations are correct, as shown below:
5. Run the following command to exit MariaDB.
Check whether the environment is set up properly as instructed below:
Run the following command to create a test file
test.php in the default root directory
/var/www/html of Apache:
Click i to switch to editing mode and enter the following content:
echo "<title>Test Page</title>"; phpinfo()
Click Esc and enter :wq to save and close the file.
Enter the following URL in a browser to access
test.php to check whether the environment is properly configured.
Public IP address of the CVM]/test.php[
If everything goes well, the following appears.
Run the following command to download the installation package.
git clone https://gitee.com/Discuz/DiscuzX.git
Run the following command to access the installation directory.
Run the following command to copy all files under "upload" to
cp -r upload/* /var/www/html/
Run the following command to grant other users the write permission.
chmod -R 777 /var/www/html
This document only demonstrates the installation steps. If a security warning that the version is too low is reported, we recommend you use an image on a higher version.
- Use the
rootaccount and password set in Installing and configuring required software to connect to the database and set up a system email address and admin username, password, and email address.
- Remember your admin username and password.
You can use a domain name that is easy to remember rather than a complicated IP address to make your forum website easier to remember and access. If you set up this website just for the purpose of learning, you can use an IP address for temporary use, which is nevertheless not recommended.
If you encounter a problem when using CVM, refer to the following documents for troubleshooting: