In the previous three documents, we completed the Apache, MySQL, PHP installation, now let us play a game, on the completed lamp to build a simple discuz forum. The package is also in the Baidu network disk that I uploaded before.
Compile and install Apache
Compile and install MySQL
Compiling and installing PHP
Baidu Network disk software compression package, password: 2r7m
- First create a "BBS" database, the BBS database all the permissions of the table to the user "Bbsuser", and set the password admin123:
mysql> CREATE DATABASE bbs; //创建"bbs"数据库mysql> GRANT all ON bbs.* TO ‘bbsuser‘@‘%‘ IDENTIFIED BY ‘admin123‘; //将bbs数据库里面所有表的权限授予给bbsuser,并设置密码//mysql>flush privileges; //刷新数据库//
- Unzip the Discuz package and recursively copy the upload directory into the Apache home directory:
unzip /opt/lamp/Discuz_X2.5_SC_UTF8.zip -d /opt/discd /opt/discp -r upload/ /usr/local/apache/htdocs/bbs
- To the BBS directory of the website, the owner of the following files is given to Apache so that we can use:
cd /usr/local/apache/htdocs/bbschown -R daemon ./configchown -R daemon ./datachown -R daemon ./uc_clientchown -R daemon ./uc_server/data
Below we can directly login BBS homepage for discuz Forum installation and testing:
Now we can create a new user in the LAN and login forum post, the following is the Administrator interface, we can manage the Disuz forum here.
Build Lamp architecture-Test: Build a simple Discuz forum