论坛搭建

安装PHP等等准备环境
修改apache httpd.conf: sudo vi /opt/httpd-2.4.2-server/conf/httpd.conf ,在 AddType application/x-gzip .gz .tgz 下面添加以下两行:

                  AddType application/x-httpd-php .php
                  AddType application/x-httpd-php-source .phps

(f) 验证php

在 /opt/httpd-2.4.2-server/htdocs/ 目录下,新建一个文件 index.php: sudo vi /opt/httpd-2.4.2-server/htdocs/index.php

在这里插入图片描述

在浏览器中,输入网址: http://localhost/index.php,打开以下页面,说明配置php成功。

在这里插入图片描述

2,准备好软件包

3, Discuz 环境配置

(a) 解压zip文件: unzip Discuz_X3.0_SC_UTF8.zip -d Discuz_X3.0_SC_UTF8

(b) 拷贝Discuz到apache httdp目录: sudo cp -r Discuz_X3.0_SC_UTF8 /opt/httpd-2.4.2-server/htdocs/

(c) 进入/opt/httpd-2.4.2-server/htdocs/Discuz_X3.0_SC_UTF8/upload/ 目录,设置子目录权限: sudo chmod -R 777 config/ data/ uc_client/ uc_server/

(d) 配置Discuz 默认文件: sudo vi /opt/httpd-2.4.2-server/conf/httpd.conf

           <IfModule dir_module>
                DirectoryIndex index.php default.php index.html index.htm
           </IfModule>

(e) 配置Discuz 虚拟目录: sudo vi /opt/httpd-2.4.2-server/conf/httpd.conf

           查找: DocumentRoot "/opt/httpd-2.4.2-server//htdocs"

           添加如下两行:
           Alias /forum "/opt/httpd-2.4.2-server//htdocs//Discuz_X3.0_SC_UTF8//upload"             // 添加一行,虚拟目录
           <Directory "/opt/httpd-2.4.2-server//htdocs//Discuz_X3.0_SC_UTF8//upload">            // 指向discuz目录

           如下图(目录名有改动,请根据自己目录修改):

在这里插入图片描述
4, Discuz 安装

(a) 按照步骤3,配置好Discuz环境变量后,在浏览器输入网址: http://localhost/Discuz_X3.0_SC_UTF8/upload/install/index.php,出现如下安装页面:

在这里插入图片描述

(b) 点击“同意”,继续

在这里插入图片描述
(c) 点击“下一步”,继续(如果没有权限,请参见上面步骤3 —— (c))

在这里插入图片描述
(d) 点击“下一步”,继续

在这里插入图片描述

(e) 点击“下一步”,在浏览器输入网址: http://localhost/forum/admin.php,出现如下页面, 说明安装成功!

在这里插入图片描述
登陆后,进入”管理中心首页“——》”首页“,会提示删除安装目录(网页):

在这里插入图片描述

这是为了防止再次安装,因此一般只需把”install“目录,修改为”install_bk"或其他名字即可,我喜欢改成"install_bk",修改命令: sudo mv install install_bk

         后台数据库访问方式:  mysql -uroot -pabcd1234

         后台数据库为 ithomer:

在这里插入图片描述

5, Discuz 功能

Dizcuz 具有非常丰富的功能,如用户注册, 论坛主题设置,页面访问权限设置,发起投票(需装插件)等功能,下面是默认论坛页面
在这里插入图片描述

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

董筱杰

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值