LNMP搭载discuz论坛系统

LNMP搭载discuz论坛系统

什么是discuz论坛

Discuz论坛是一种基于PHP和MySQL的开源论坛系统,由中国的康盛创想科技公司开发和维护。它是中国最受欢迎的论坛系统之一,被广泛应用于各类网站和社区。

Discuz论坛提供了完善的用户管理、板块管理、主题帖管理、回帖管理等功能,用户可以在论坛上进行注册、登录、发帖、回帖、私信等操作。论坛管理员可以对用户进行权限管理,设定不同用户组的权限和限制,还可以对论坛进行主题风格的定制和插件的安装。

Discuz论坛系统具有良好的扩展性和可定制性,用户可以根据自己的需求进行二次开发和定制,满足不同网站的特定需求。同时,Discuz论坛系统还提供了丰富的插件和模板资源,用户可以根据自己的喜好选择合适的插件和模板来美化和增强论坛功能。

总的来说,Discuz论坛是一种功能强大、易于使用和定制的论坛系统,广泛应用于各类网站和社区,为用户提供了一个交流、分享和互动的平台。

discuz论坛要求:

首先你的主机要有lnmp架构

可以查看我之前的博客

源码搭建lnmp架构

php 5.6及以上

mysql 5.6及以上或mariadb

任意版本nginx

nginx配置

//修改nginx配置文件
增加一个location段
location /nene {
            root html;
            index index.php;
        }
[root@localhost conf]# systemctl restart nginx

数据库设置

这边我是下载到别的主机,然后用ftp传过来的

//数据库用户创建
[root@localhost ~]# mysql -uroot -payachinene
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.6.15-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database discuz;
Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> grant all on discuz.* to 'nene'@'%' identified by 'admin123';
Query OK, 0 rows affected (0.004 sec)

MariaDB [(none)]> grant all on discuz.* to 'nene'@'localhost' identified by 'admin123';
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.001 sec)

安装discuz论坛

//下载软件包解压到/tmp下
[root@localhost ~]# unzip Discuz_X3.5_SC_UTF8_20231001.zip -d /tmp

//将解压出来的upload目录下的所有东西复制到/usr/local/nginx/html/nene下
[root@localhost tmp]# cp -r upload/* /usr/local/nginx/html/nene/
[root@localhost tmp]# cd /usr/local/nginx/html/nene/
[root@localhost nene]# ls
admin.php  config           favicon.ico  index.php   plugin.php  source     uc_server
api        connect.php      forum.php    install     portal.php  static
api.php    crossdomain.xml  group.php    member.php  robots.txt  template
archiver   data             home.php     misc.php    search.php  uc_client

//给以下目录设置权限
[root@localhost nene]# chown -R root:nginx config
[root@localhost nene]# chown -R root:nginx data
[root@localhost nene]# chown -R root:nginx uc_client
[root@localhost nene]# chown -R root:nginx uc_server
[root@localhost nene]# chmod -R 777 config
[root@localhost nene]# chmod -R 777 data
[root@localhost nene]# chmod -R 777 uc_client
[root@localhost nene]# chmod -R 777 uc_server

访问论坛页面,并进行安装

在这里插入图片描述

访问页面是目录里install/index.php文件

在这里插入图片描述

所有要求都达标,进行下一步

在这里插入图片描述

选择中间的选项进行安装

在这里插入图片描述

在这里插入图片描述

设置一个你想要的用户名和密码

在这里插入图片描述

安装成功

在这里插入图片描述

配置rewrite转发

//修改配置文件,在新虚拟主机修改
server {
        listen       80;
        server_name  www.ayachinene.com;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   /usr/local/nginx/html/nene;
            index  index.php index.html index.htm;
        }
//配置新的虚拟主机
server {
        listen       80;
        server_name  www.plqq.com;
        rewrite ^/(.*)$ http://www.ayachinene.com/$1 break;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            index  index.php index.html index.htm;
        }

        location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
    }

访问www.plqq.com将跳转至www.ayachinene.com下

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值