【 Discuz! 】CentOS7.x上基于LAMP环境搭建Discuz!论坛
Discuz! 是全球成熟度最高、覆盖率最大的论坛软件系统之一。
自 2001 年 6 月面世以来,Discuz! 已拥有 15 年以上的应用历史和 200 多万网站用户案例。
目前,Discuz! 已经发展成为一个以社区为基础的专业建站平台,让论坛(BBS)、社交网络(SNS)、门户(Portal)、群组(Group)、开放平台(Open Platform)应用充分融合于一体,帮助网站实现一站式服务。
官网:http://www.discuz.net/forum.php
官方gitee:https://gitee.com/ComsenzDiscuz/DiscuzX
安装包下载:http://www.discuz.net/thread-3570835-1-1.html
一、实验环境
操作系统:CentOS7.2 Minimal
IP:192.168.1.105
Discuz!版本:X3.4
二、防火墙、selinux设置
# setenforce 0
# sed -i ‘s/^SELINUX=.*/SELINUX=permissive/g’ /etc/selinux/config
# systemctl stop firewalld
# systemctl disable firewalld
三、软件安装
# yum -y install git
# yum -y install mariadb mariadb-server
# yum -y install httpd
# yum -y install php php-mysql
# yum -y install gd php-gd gd-devel php-xml php-common php-mbstring php-ldap php-pear php-xmlrpc php-imap
# git clone https://gitee.com/ComsenzDiscuz/DiscuzX.git

四、相关服务启动
# systemctl start mariadb httpd
# systemctl enable mariadb httpd

五、数据库设置
# mysql_secure_installation
设置mariadb的root密码:Discuz@123


创建# Discuz库和用户,授权
# mysql -u root -p”Discuz@123″
> create database discuz;
> grant all on discuz.* to ‘discuz’@’localhost’ identified by ‘Discuz@123’;
> flush privileges;

六、php网页解析和数据库访问测试
# vim /var/www/html/test1.php

# vim /var/www/html/test2.php

测试访问:http://192.168.1.105/test1.php

测试访问:http://192.168.1.105/test2.php

http://www.w3school.com.cn/php/func_mysql_connect.asp
https://dev.mysql.com/doc/apis-php/en/apis-php-function.mysql-connect.html
七、Discuz!论坛代码部署
# cp -rf DiscuzX/upload/ /var/www/html/bbs
# chown -R apache:apache /var/www/html/bbs
# systemctl restart httpd

八、Discuz!论坛WEB安装
web访问:http://192.168.1.105/bbs/install/




数据库名: mariadb中创建的数据库discuz
数据库用户名: mariadb中被授权的用户discuz
数据库密码: mariadb中被授权的用户discuz登录数据库discuz的密码Discuz@123
管理员账号: admin
管理员密码: 自定义后台管理员密码



九、安装后目录处理
安装完成后,我们应该将install目录转移,并限制访问权限
# cd /var/www/html/bbs
# mv install/ install.lock
# chmod 600 install.lock/

十、注册、发帖、回复等论坛操作测试


http://www.w3school.com.cn/php/func_mysql_connect.asp
https://dev.mysql.com/doc/apis-php/en/apis-php-function.mysql-connect.html
2. 本站不保证所提供下载的资源的准确性、安全性和完整性,资源仅供下载学习之用!如有链接无法下载、失效或广告,请联系客服处理,有奖励!
3. 您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容资源!如用于商业或者非法用途,与本站无关,一切后果请用户自负!
4. 如果您也有好的资源或教程,您可以投稿发布,成功分享后有站币奖励和额外收入!
模板猫 » 【 Discuz! 】CentOS7.x上基于LAMP环境搭建Discuz!论坛
常见问题FAQ
- 免费下载或者贵宾会员专享资源能否直接商用?
- 本站所有资源版权均属于原作者所有,提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 《免责声明》。
- 点击下载链接不跳转怎么回事?
- 您好,QQ内打开是不跳转的,一少部分浏览器也不跳转,一般的UC了,搜狗 360等浏览器都可以跳转。
- 可以直接把资源发给我吗?
- 您好,付费资源可以直接把链接发送给您,免费资源不提供任何帮助,软件资源自测,或者请站长喝红牛!