Used by over 2 million websites, Discuz! is the world’s most sophisticated and predominant forum software. This document describes how to create a 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! site, 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 is used to build a Discuz! website.
See Logging in to Linux Instance Using Standard Login Method. You can also use other login methods that you are more comfortable with:
Tencent Cloud hosts a software repository containing CentOS official releases, which provides the most recent and stable version. 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 a password for
root user and complete other basic configurations, so the root user can access the database.
- Run the following command to set the password before your first login to MariaDB.
- When you see the prompt to enter root password, press Enter 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 press Enter.
mysql -u root -p
A successful login is shown below:
Run the following command to exit MariaDB.
Check whether the environment is set up properly as instructed below:
test.phpin the default root directory
echo "<title>Test Page</title>"; phpinfo()
test.phpto check whether the environment is properly configured.
If everything goes well, the following appears.
Public IP address of the CVM]/test.php[
Run the following command to download the installation package.
git clone https://gitee.com/Discuz/DiscuzX.git
cp -r upload/* /var/www/html/
chmod -R 777 /var/www/html
rootand the password set in Installing and configuring required software to connect to the database and set up a system email address and administrator username, password, and email address.
- Remember your administrator username and password.
Using a domain name instead of an IP can help users remember your website easier.
Check the following documentation for problems of using CVM: