Cloud server builds Discuz forum based on CentOS

1. Prepare the LAMP environment

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

  1. Install MySQL
    Use yum to install MySQL:
yum install mysql-server -y

After the installation is complete, start the MySQL service:

service mysqld restart

Use mysql default account name and password, you can also set your own MySQL account name and password

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

Set MySQL to start automatically at boot:

chkconfig mysqld on
  1. 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
  1. 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

Two, install and configure Discuz

  1. Install Discuz
    CentOS 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

  1. 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
  1. Restart Apache
service httpd restart

Finally, you can check through the IP address: http://IP address/install

Tencent Cloud new user benefits: https://cloud.tencent.com/act/cps/redirect?redirect=1040

Recommended Posts

Cloud server builds Discuz forum based on CentOS
Build Discuz Forum based on CentOS
Build Discuz forum based on ubuntu
Install Zabbix 3.4 based on CentOS 7
install virtualbox on centos server
Install Nginx server on CentOS 7
Common Linux operations (based on centos7)
Tencent Cloud Centos7 install java server
Tencent Cloud Centos7 install java server
CentOS builds a cloud service platform
Build Elasticsearch 6.2.4 (centos) based on docker
Configure Nginx reverse proxy based on CentOS 7
Configure Nginx load balancing based on CentOS 7
Configure Nginx forward proxy based on CentOS 7
Build Nginx based on Centos 7 (including virtual host)
Build Discuz Forum in LNMP Environment under CentOS7
Configure Nginx to start automatically based on CentOS 7
Notes on installing pptp server under CentOS 7 ok
Configure Wolfram Engine on Tencent Cloud ubuntu server
3 minutes to teach you to build gitea on Centos server
How to configure FTP server with Vsftpd on CentOS 8
How to install and configure NFS server on CentOS 8
How to configure FTP server with Vsftpd on CentOS 8