RHEL7搭建Discuz论坛

2023-10-30 18:18
文章标签 搭建 论坛 discuz rhel7

本文主要是介绍RHEL7搭建Discuz论坛,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

RHEL7中配置

  • 关闭防火墙和selinux
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# setenforce 0
  • 安装php
[root@localhost ~]# yum install php* -y
  • 安装httpd服务
[root@localhost ~]# yum install httpd -y
  • 安装数据库
[root@localhost ~]# yum install mariadb -y   这一步可以省略 系统默认有mysql
[root@localhost ~]# rpm -qa | grep mariadb
mariadb-libs-5.5.44-2.el7.x86_64
mariadb-server-5.5.44-2.el7.x86_64
mariadb-5.5.44-2.el7.x86_64
  • 启动数据库
[root@localhost ~]# systemctl start mariadb
  • 初始化数据库
[root@localhost ~]# mysql_secure_installation 
/usr/bin/mysql_secure_installation:行379: find_mysql_client: 未找到命令NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.Enter current password for root (enter for none): (这里回车,设置root密码)
OK, successfully used password, moving on...Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..... Success!By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.Remove anonymous users? [Y/n] y... Success!Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] y... Success!By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.Remove test database and access to it? [Y/n] y- Dropping test database...... Success!- Removing privileges on test database...... Success!Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.Reload privilege tables now? [Y/n] y... Success!Cleaning up...All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.Thanks for using MariaDB!
  • 登陆数据库
[root@localhost ~]# mysql -uroot -predhat
  • 创建数据库
    注意命令分号结尾
MariaDB [(none)]> create database luntan;
Query OK, 1 row affected (0.00 sec)
database' at line 1
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| luntan             |
| mysql              |
| performance_schema |
+--------------------+
4 rows in set (0.00 sec)
MariaDB [(none)]> exit
Bye
  • 重启两个服务
[root@localhost ~]# systemctl restart mariadb
[root@localhost ~]# systemctl restart httpd
  • 复制并解压论坛源码
[root@localhost test]# cp /test/Discuz_X3.2_SC_UTF8.zip /var/www/html/
[root@localhost test]# cd /var/www/html/
[root@localhost test]# unzip Discuz_X3.2_SC_UTF8.zip 
[root@localhost html]# ll
总用量 12204
-rw-r--r--.  1 root root 12486773 12月  2 20:35 Discuz_X3.2_SC_UTF8.zip
drwxr-xr-x.  2 root root     4096 5月  31 2016 readme
drwxr-xr-x. 12 root root     4096 5月  31 2016 upload
drwxr-xr-x.  4 root root       68 5月  31 2016 utility
  • 配置论坛数据目录
[root@localhost html]# cd upload/
[root@localhost upload]# ll
总用量 92
-rw-r--r--.  1 root root 2739 5月  31 2016 admin.php
drwxr-xr-x. 11 root root 4096 5月  31 2016 api
-rw-r--r--.  1 root root  727 5月  31 2016 api.php
drwxr-xr-x.  2 root root   22 5月  31 2016 archiver
drwxr-xr-x.  2 root root   87 5月  31 2016 config
-rw-r--r--.  1 root root  922 5月  31 2016 connect.php
-rw-r--r--.  1 root root  253 5月  31 2016 cp.php
-rw-r--r--.  1 root root  106 5月  31 2016 crossdomain.xml
drwxr-xr-x. 13 root root 4096 5月  31 2016 data
-rw-r--r--.  1 root root 5558 5月  31 2016 favicon.ico
-rw-r--r--.  1 root root 2242 5月  31 2016 forum.php
-rw-r--r--.  1 root root  821 5月  31 2016 group.php
-rw-r--r--.  1 root root 1290 5月  31 2016 home.php
-rw-r--r--.  1 root root 5669 5月  31 2016 index.php
drwxr-xr-x.  5 root root   60 5月  31 2016 install
-rw-r--r--.  1 root root 1025 5月  31 2016 member.php
-rw-r--r--.  1 root root 2462 5月  31 2016 misc.php
-rw-r--r--.  1 root root 1757 5月  31 2016 plugin.php
-rw-r--r--.  1 root root  988 5月  31 2016 portal.php
-rw-r--r--.  1 root root  582 5月  31 2016 robots.txt
-rw-r--r--.  1 root root 1161 5月  31 2016 search.php
drwxr-xr-x. 10 root root 4096 5月  31 2016 source
drwxr-xr-x.  6 root root   67 5月  31 2016 static
drwxr-xr-x.  3 root root   36 5月  31 2016 template
drwxr-xr-x.  6 root root   86 5月  31 2016 uc_client
drwxr-xr-x. 13 root root 4096 5月  31 2016 uc_server
-rw-r--r--.  1 root root 1682 5月  31 2016 userapp.php
[root@localhost upload]# chmod 777 config/ data/ uc_* -R

通过页面进行访问并安装

  • 论坛安装界面
    http://172.16.40.5/upload/

  • 我同意

在这里插入图片描述

  • 下一步
    在这里插入图片描述

  • 选择全新安装,下一步
    在这里插入图片描述

  • 数据库名改为刚刚设置的luntan
    数据库密码为刚刚设置的数据库的密码
    管理员账号和密码可自行设置
    在这里插入图片描述

  • 安装成功
    在这里插入图片描述

  • 可正常使用论坛
    在这里插入图片描述

这篇关于RHEL7搭建Discuz论坛的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/309736

相关文章

如何使用Haporxy搭建Web群集

《如何使用Haporxy搭建Web群集》Haproxy是目前比较流行的一种群集调度工具,同类群集调度工具有很多如LVS和Nginx,本案例介绍使用Haproxy及Nginx搭建一套Web群集,感兴趣的... 目录一、案例分析1.案例概述2.案例前置知识点2.1 HTTP请求2.2 负载均衡常用调度算法 2.

一文详解如何在idea中快速搭建一个Spring Boot项目

《一文详解如何在idea中快速搭建一个SpringBoot项目》IntelliJIDEA作为Java开发者的‌首选IDE‌,深度集成SpringBoot支持,可一键生成项目骨架、智能配置依赖,这篇文... 目录前言1、创建项目名称2、勾选需要的依赖3、在setting中检查maven4、编写数据源5、开启热

如何搭建并配置HTTPD文件服务及访问权限控制

《如何搭建并配置HTTPD文件服务及访问权限控制》:本文主要介绍如何搭建并配置HTTPD文件服务及访问权限控制的问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、安装HTTPD服务二、HTTPD服务目录结构三、配置修改四、服务启动五、基于用户访问权限控制六、

pytest+allure环境搭建+自动化实践过程

《pytest+allure环境搭建+自动化实践过程》:本文主要介绍pytest+allure环境搭建+自动化实践过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录一、pytest下载安装1.1、安装pytest1.2、检测是否安装成功二、allure下载安装2.

使用vscode搭建pywebview集成vue项目实践

《使用vscode搭建pywebview集成vue项目实践》:本文主要介绍使用vscode搭建pywebview集成vue项目实践,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地... 目录环境准备项目源码下载项目说明调试与生成可执行文件核心代码说明总结本节我们使用pythonpywebv

Windows Server 2025 搭建NPS-Radius服务器的步骤

《WindowsServer2025搭建NPS-Radius服务器的步骤》本文主要介绍了通过微软的NPS角色实现一个Radius服务器,身份验证和证书使用微软ADCS、ADDS,具有一定的参考价... 目录简介示意图什么是 802.1X?核心作用802.1X的组成角色工作流程简述802.1X常见应用802.

Spring Cloud GateWay搭建全过程

《SpringCloudGateWay搭建全过程》:本文主要介绍SpringCloudGateWay搭建全过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录Spring Cloud GateWay搭建1.搭建注册中心1.1添加依赖1.2 配置文件及启动类1.3 测

SpringBoot快速搭建TCP服务端和客户端全过程

《SpringBoot快速搭建TCP服务端和客户端全过程》:本文主要介绍SpringBoot快速搭建TCP服务端和客户端全过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,... 目录TCPServerTCPClient总结由于工作需要,研究了SpringBoot搭建TCP通信的过程

Gradle下如何搭建SpringCloud分布式环境

《Gradle下如何搭建SpringCloud分布式环境》:本文主要介绍Gradle下如何搭建SpringCloud分布式环境问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地... 目录Gradle下搭建SpringCloud分布式环境1.idea配置好gradle2.创建一个空的gr

Linux搭建单机MySQL8.0.26版本的操作方法

《Linux搭建单机MySQL8.0.26版本的操作方法》:本文主要介绍Linux搭建单机MySQL8.0.26版本的操作方法,本文通过图文并茂的形式给大家讲解的非常详细,感兴趣的朋友一起看看吧... 目录概述环境信息数据库服务安装步骤下载前置依赖服务下载方式一:进入官网下载,并上传到宿主机中,适合离线环境