What this article is sharing is to use a Centos7 to install lamp using the rpm package and publish the discuz forum.
Address: 192.168.1.102
Use yum to install httpd mariadb php
yum -y install httpd mariadb-server mariadb php php-mysql
Start httpd, mariadb
systemctl start httpd
systemctl start mariadb
Log in to mariadb without secret, in order to improve security, set a password
mysql \\无密root登录
mysql_secure_installation \\修改root密码
Use the new password to log in to Mariadb, and create a database and manage users for the website
mysql -uroot -p123.com
MariaDB [(none)]> create database bbs;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all on bbs.* to runbbs@localhost identified by '123.com';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>exit
Test whether php is installed successfully
[root@localhost ~]# cd /var/www/html
[root@localhost html]# vim info.php
Add to
<?php
phpinfo();
?>
Save and exit
Test visit: http://192.168.1.102/info.php
appears as shown below, indicating that php is normal
Copy discuz code package to /usr/src, unzip
Note: The forum code package is put in the resources
unzip Discuz_X3.3_SC_UTF8.zip
Move the decompressed upload to the root directory of the website
mv upload/ /var/www/html/bbs
Set bbs directory permissions
chmod -R 777 /var/www/html/bbs
Install discuz forum
http://192.168.1.102/bbs
Note: In the installation process, except for the database name, user name, and password, everything else is the next step.
Visit the forum background
http://192.168.1.102/bbs/admin.php