Build Discuz Forum based on CentOS

Tencent Cloud provides [Developer Lab] (https://cloud.tencent.com/developer/labs/lab/10030?from=10680) to help users build Discuz forums. The content of the tutorial is as follows. Users can click [Developer Lab] (https://cloud.tencent.com/developer/labs/lab/10030?from=10680) to quickly get on the computer to complete the experiment.

experiment screenshot

Prepare LAMP environment##

Task time: 15min ~ 30min

LAMP is the abbreviation of Linux, Apache, MySQL and PHP. It is the basic operating environment on which the Discuz forum system depends. Let's prepare the LAMP environment first

Install MySQL

Use yum to install MySQL:

yum install mysql-server -y

After the installation is complete, start the MySQL service:

service mysqld restart

This experiment uses the mysql default account name and password. You can also set your own MySQL account name and password: [?], refer to the following:

/usr/bin/mysqladmin -u root password 'Password'

Set MySQL to start automatically at boot:

chkconfig mysqld on

The password in the following command is automatically generated by the tutorial for you. In order to facilitate the experiment, it is not recommended to use other passwords. If you set another password, please remember the password, you will use it in the next steps.

Install Apache components###

Use yum to install Apache components:

yum install httpd -y

After installation, start the httpd process:

service httpd start

Set httpd to start automatically after booting:

chkconfig httpd on

Install PHP

Use yum to install PHP:

yum install php php-fpm php-mysql -y

After installation, start the PHP-FPM process:

service php-fpm start

After startup, you can use the following command to see which port the PHP-FPM process is listening on

netstat -nlpt | grep php-fpm

Set PHP-FPM to start automatically after booting:

chkconfig php-fpm on

CentOS 6 has already installed PHP-FPM and PHP-MYSQL by default, and the following commands may prompt that they have been installed.

PHP-FPM listens on port 9000 by default

Install and configure Discuz

Task time: 15min ~ 30min

Install Discuz

CentOS 6 does not have Discuz's yum source, so we need to download a Discuz compressed package:

wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_UTF8.zip

After the download is complete, unzip the compressed package

unzip Discuz_X3.2_SC_UTF8.zip

After unzipping, you can see the source code of discuz in the upload folder

Go to Discuz official website to find an installation package and copy the installation package download path, here we use Discuz_X3.2_SC_UTF8.zip

Configure Discuz

Since PHP accesses the /var/www/html/ folder by default, we need to copy all the files in the upload folder to the /var/www/html/ folder

cp -r upload/* /var/www/html/

Grant permissions to the /var/www/html directory and its subdirectories

chmod -R 777/var/www/html

Restart Apache

service httpd restart

Prepare domain name and certificate##

Task time: 15min ~ 30min

Domain Registration

If you don’t have a domain name yet, you can Buy on Tencent Cloud. For the process, please refer to the video below.

Domain name resolution

After the domain name is purchased, the domain name needs to be resolved to the experimental cloud host. The IP of the experimental cloud host is:

< Your CVM IP address>

For the domain name purchased in Tencent Cloud, you can [add resolution record to the console] (https://console.qcloud.com/domain), and the process can refer to the following video:

It takes some time for the domain name setting to take effect after resolution. Use the ping command to check whether the domain name is effective, such as:

ping www.yourdomain.com

If the information returned by the ping command contains the resolved IP address you set, the resolution is successful.

Pay attention to replace www.yourmpdomain.com in the following command as your own registered domain name

You're done###

Recommended Posts

Build Discuz Forum based on CentOS
Build Discuz forum based on ubuntu
Cloud server builds Discuz forum based on CentOS
Build Elasticsearch 6.2.4 (centos) based on docker
Build WeChat applet service based on CentOS
Build WeChat applet service based on CentOS
Build k8s1.9.9 on centos7
Jenkins build on centos
Build Nginx based on Centos 7 (including virtual host)
Build Discuz Forum in LNMP Environment under CentOS7
Build MariaDB replication on CentOS
Install Zabbix 3.4 based on CentOS 7
Common Linux operations (based on centos7)
Build Nginx environment on Linux (CentOS)
Configure Nginx reverse proxy based on CentOS 7
Configure Nginx load balancing based on CentOS 7
Configure Nginx forward proxy based on CentOS 7
CentOS7 build FastDFS distributed file system (on)
CentOS7 build jenkins
Centos build lnmp
Centos7 build python3.8.5+scrapy+gerapy
Configure Nginx to start automatically based on CentOS 7
How to build a LAMP environment on centos7.2
CentOS7.3 64 bit, build Zabbix3.4
Install Docker on Centos7
CentOS build private git
install LNMP on centos7.4
Linux (centos7) build gitlab
Install Java on Centos 7
3 minutes to teach you to build gitea on Centos server
Xfs configuration on centos7
CentOS6.7 build LNMP environment
Centos6.9 build rabbitmq 3.6.8 cluster
Nodejs install on centos7
Install FFmpeg on CentOS 8
Install RabbitMQ on CentOS 7
Install Node.js on Centos
Maven install on centos7
Install Surelog on CentOS8
Build Hadoop in CentOS
Deploy vuepress on centos7
Openjdk install on centos7
Centos7 build DNS service
Install Jenkins on centos7
install RabbitMQ on centos
Install RabbitMQ on CentOS 7
install Docker on centos6.5
install oracle on centos
Install Elasticsearch 6 on centos7
Install RabbitMQ on CentOS7
Deploy Jenkin on centos7
CentOS 7 build LNMP environment
First try to build a Ceph storage cluster on Centos7
CentOS 8 is officially released based on Red Hat Enterprise Linux 8
Build docker environment under Centos6.5
CentOs7.3 build Solr stand-alone service
Build OpenV** Server under CentOS7
Install mysql online on centos
Build zabbix monitoring zabbix4.2 in CentOS7.6
Install ElasticSearch 7.x on CentOS 7
Build OpenLDAP server under CentOS7