一、项目架构
LNMP= Linux + Ngnix + mariadb + PHP
二、项目准备
1.关闭安全软件
[root@localhost ~]# systemctl stop firewalld.service
[root@localhost ~]# systemctl disable firewalld.service
[root@localhost ~]# systemctl status firewalld.service
[root@localhost ~]# vim /etc/selinux/config
SELINUX=enforcing
改为
SELINUX=disabled
[root@localhost ~]# reboot
[root@localhost ~]#setenforce 0
2.修改主机名
[root@localhost ~]# hostnamectl set-hostname tangxin
[root@localhost ~]# bash
[root@tangxin~]# setenforce 0
3.配置本地光盘镜像为yum源
[root@tangxin~]# mount /dev/sr0 /mnt # 挂载光盘
[root@tangxin ~]# vim /etc/yum.repos.d/yum.repo
[baseos]
name=baseos
baseurl=/mnt/BaseOS
gpgcheck=0
[appstream]
name=appstream
baseurl=/mnt/AppStream
gpgcheck=0
[root@tangxin~]# yum clean all
[root@tangxin ~]# yum makecache
4.1测试网络连通性
2.安装PHP,NGINX,数据库
[root@tangxin /]# dnf install -y nginx
[root@tangxin /]# dnf install -y nginx
[root@tangxin /]# dnf install -y mariadb-server设置nginx:
4.3启动和配置环境
三、项目部署
1.下载Discuz安装包
(1)下载安装
在Windows系统安装,地址:https://gitee.com/Discuz/DiscuzX/attach_files/2044572/download,使用Xftp传输到虚拟机的“/”
四,安装论坛软件:
windows中打开浏览器输入服务器ip ,按照Discuz安装向导提示操作: