With more than 2 million forums based on Discuz!, it is the most sophisticated and predominant internet discussion software in the world. This article describes how to create a forum using Discuz! and deploy the LAMP (Linux, Apache, MariaDB, and PHP) runtime environment it needs.
To set up Discuz! manually, you should be familiar with common Linux commands, such as Installing Software via YUM in CentOS and know how to use the software you install and their version compatibility.
This article uses the following:
Log in to a Linux instance using WebShell (recommended). You can also use another login method that you are comfortable with.
Tencent Cloud hosts an image of the CentOS official version installation source, which contains the most recent and stable version of the software. Use Yum to install CentOS.
Run the following command to install Apache, MariaDB, and PHP:
yum install httpd php php-fpm php-mysql mariadb mariadb-server -y
Run the following commands to start the services:
systemctl start httpd systemctl start mariadb systemctl start php-fpm
Run the following commands to set a password for
root and configure the database so
root can access it.
- Run the command before you log in to MariaDB for the first time.
- Enter the password for
rootand press Enter. Your password is not shown on the screen. Enter the password a second time to confirm and complete the configuration as prompted on the screen.
Run the following command to log in to MariaDB. Use 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.
Follow these steps to make sure the environment is set up properly:
test.phpin the default root directory "/var/www/html" of Apache:
echo "<title>Test Page</title>"; phpinfo();
test.phpto check whether the environment is properly configured.
If it is, the following appears:
Run the following command to download the installation package.
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.
Use a domain name that makes your website easier to remember. We recommend you obtain a domain name and set it to point to your Discuz! site. If you are installing Discuz! just to learn the process, you can keep using the IP address. Otherwise, use a domain name.
If you encounter a problem when using CVM, refer to the following documents for troubleshooting: