您现在的位置是:首页 > cms教程 > Discuz教程Discuz教程

LNMP安装discuz

盼儿2025-07-17Discuz教程已有人查阅

导读php7的yum源安装1.安装epel源2.php3.nginx4.mariadb5.discuz

php7的yum源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
安装
yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel
LNMP
1.安装epel源
[root@localhost ~]# yum -y install epel-release
2.php
yum -y install libmcrypt-devel mhash-devel libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel
glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devellibidn-devel opensslopenssl-devel libzip
yum -y install php php-mysql php-fpm php-gdphp-pecl-zendopcache
[root@localhost ~]# vim /etc/php-fpm.d/ .conf
user = nginx
group = nginx
[root@localhost php]# setfacl -m u:nginx:rwx session
3.nginx
[root@localhost ~]# yum install nginx -y
server {
listen 80;
server_name.lh.com;
location / {
root /usr/share/nginx/html;
index index.php index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/$fastcgi_script_name;
include fastcgi_params;
}
}
[root@localhost conf.d]# mkdir /php/nginx/web/ -pv
[root@localhost web]# yum install lrzsz
[root@localhost web]# yum install unzip
[root@localhost nginx]# chown -R nginx:nginx web
4.mariadb
[root@localhost conf.d]# yum install mariadb-server mariadb
[root@localhost conf.d]# vim /etc/my.cnf
skip_name_resolve = on
innodb_file_per_table = on
[root@localhost conf.d]# systemctl start mariadb
MariaDB [(none)]> create database discuz default charset 'utf8';
MariaDB [(none)]> grant all on discuz.* to 'disuser'@'%' identified by 'khb123';
5.discuz
[root@localhost html]# git clone https://gitee.com/ComsenzDiscuz/DiscuzX.git
[root@localhost html]# cp -rf /php/nginx/discuz/DiscuzX/upload/* /usr/share/nginx/html/
[root@localhost html]# chown -R nginx:nginx /usr/share/nginx/html/

本文标签:

很赞哦! ()

相关源码

  • (PC+WAP)绿色产品环保设备垃圾桶厂家公司网站pbootcms模板为垃圾桶生产商、环保设备企业打造的高端响应式门户模板,基于PbootCMS开源内核深度开发。采用HTML5自适应架构,无缝实现PC与手机端数据实时同步与交互优化查看源码
  • (自适应响应式)动力刀座五金机械设备pbootcms网站源码下载为动力刀座及五金机械企业定制的响应式网站框架,基于PbootCMS系统深度开发,助力传统制造企业实现数字化转型升级。采用手工编写的DIV+CSS前端架构,代码执行效率提升40%。查看源码
  • (自适应)品牌创意设计作品工作室pbootcms模板下载该模板适用于品牌策划、艺术设计、广告创意公司官网,亦可通过替换图文快速适配其他行;高端创意设计公司工作室网站源码极简代码架构、艺术化视觉布局、企业级功能扩展性。查看源码
  • 响应式帝国cms7.5NBA黑色体育资讯模板下载本模板为体育新闻媒体、报道机构设计,采用帝国CMS7.5内核开发,具备完整的资讯发布、体育日历、数据展示功能。响应式布局确保在手机端呈现实时资讯和图文内容查看源码
  • (自适应)绿色LED灯具照明灯饰灯光灯泡pbootcms网站源码下载本模板基于PbootCMS内核开发,为LED照明、灯具制造及相关光电技术企业量身打造。设计充分考虑了照明行业的展示需求,从产品陈列到技术说明,从光源展示到工程案例,每一个细节都体现出专业照明行业的特点。查看源码
  • (自适应)物流运输快递仓储货运网站模板免费下载基于PbootCMS内核开发的物流运输行业专用模板,深度适配仓储货运企业的业务展示需求。前端采用响应式布局,自动适配手机端访问,后台数据实时同步更新,帮助企业高效展示运输网络、仓储设施、服务流程等核心业务模块。查看源码
分享笔记 (共有 篇笔记)
验证码:

本栏推荐