【 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值