一、环境准备  

centos6.4,其apache、php、mysql都是yum安装的,主要是方便快捷。Discuz使用的使用域名www.longining.com,后台使用的域名ucenter.longining.com

UCenter_1.6.0_SC_UTF8.zip

Discuz_X3.0_SC_UTF8.zip


二.web服务器安装与设置


1.安装httpd、php

[root@master ~]# yum install -y htthpd php

2.测试php

[root@master html]# touch test.php

test.php内容如下

<?php
phpinfo();
?>

在浏览器输入:http://www.longining.com/test.php。

构建基于LAMP的论坛(Discuz)_Discuz ucenter  论坛

                                          php测试




三.数据库安装与设置


1.安装mysql


[root@master html]# yum install -y mysql-server
[root@master html]# /etc/init.d/mysqld start

2.创建论坛的数据库及设置用户权限

mysql> create database bbsdb;      //创建数据库
Query OK, 1 row affected (0.04 sec)
mysql> grant all on bbsdb.* to runbbs@localhost identified by 'pwd@123';                        //赋予用户runbbs权限
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;        //刷新数据库
Query OK, 0 rows affected (0.00 sec)
mysql> exit



四.安装Discuz论坛


1.解压相关包

[root@master LAMP]# unzip -d discuz Discuz_X3.0_SC_UTF8.zip
[root@master LAMP]# mv discuz/upload/ /var/www/html/bbs


2.目录权限设置

[root@master bbs]# chown apache:apache data/ -R
[root@master bbs]# chown apache:apache -R config/
[root@master bbs]# chown apache:apache -R uc_server/
[root@master bbs]# chown apache:apache -R uc_client/


3.浏览器安装

 www.longining.com/install/index.php

构建基于LAMP的论坛(Discuz)_Discuz ucenter  论坛_02

                                安装向导

构建基于LAMP的论坛(Discuz)_Discuz ucenter  论坛_03

                                   开始安装

构建基于LAMP的论坛(Discuz)_Discuz ucenter  论坛_04

                                   设置环境

构建基于LAMP的论坛(Discuz)_Discuz ucenter  论坛_05

                                 安装数据库

构建基于LAMP的论坛(Discuz)_Discuz ucenter  论坛_06

                            成功界面



五.安装论坛后台管理


1.解压软件包

[root@master LAMP]# unzip -d ucenter UCenter_1.6.0_SC_UTF8.zip
[root@master LAMP]# mv ucenter/upload/ /var/www/html/ucenter


2.设置数据库

mysql> create database ucenter;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on ucenter.* to runucenter@localhost identified by 'pwd@123';
Query OK, 0 rows affected (0.22 sec)


3.将php的配置文件php.ini中229行short_open_tag改为on

构建基于LAMP的论坛(Discuz)_Discuz ucenter  论坛_07

修改目录权限

[root@master ucenter]# chown apache:apache -R data/


4.浏览器安装

构建基于LAMP的论坛(Discuz)_Discuz ucenter  论坛_08

                                     安装向导

构建基于LAMP的论坛(Discuz)_Discuz ucenter  论坛_09

                                  环境检查

构建基于LAMP的论坛(Discuz)_Discuz ucenter  论坛_10

                                 数据设置

构建基于LAMP的论坛(Discuz)_Discuz ucenter  论坛_11

                                     安装数据库

构建基于LAMP的论坛(Discuz)_Discuz ucenter  论坛_12

                                     安装成功

至此论坛安装成功。使用方面慢慢熟悉。