您现在的位置是:首页 > 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/

本文标签:

很赞哦! ()

相关源码

  • (自适应)幽默笑话脑筋急转弯搞笑趣图博客pbootcms模板下载本模板基于PbootCMS系统开发,专为幽默笑话、搞笑趣图类网站设计。采用轻松活泼的布局风格,突出娱乐内容分享特色,适合各类笑话、段子、搞笑图片等内容展示。查看源码
  • (自适应)蓝色沙盘复古建筑模型制作网站模板源码下载为建筑沙盘模型企业设计的响应式网站模板,通过三维空间展示技术结合产品参数可视化,有效提升模型作品的线上呈现效果与客户咨询转化率。查看源码
  • 帝国cms7.5模板生活常识美食女性时尚综合资讯门户源码本模板为帝国cms7.5生活资讯类网站设计,以天奇生活网为参考原型,涵盖生活常识、美食烹饪、女性时尚等多元化内容板块。采用响应式布局设计,适配各种终端设备,为访客提供优质的阅读体验。模板结构清晰合理,内容展示层次分明,符合生活类网站的用户需求。查看源码
  • 帝国cms7.5游戏门户H5小游戏网站模板源码免费下载基于帝国CMS7.5开发的H5游戏门户模板,为在线游戏平台设计。支持PC端与移动端同步生成,打造完整的游戏娱乐体验平台。查看源码
  • (PC+WAP)红色户外岗亭钢结构岗亭pbootcms网站模板为钢结构岗亭、户外设施企业打造的高端响应式营销门户,基于PbootCMS开源内核深度开发,采用HTML5自适应架构,实现PC与移动端数据实时同步展示。查看源码
  • (自适应)蓝色环保科技设备带三级栏目网站模板下载该模板为环保科技企业设计,提供专业的产品展示与技术服务平台。采用响应式布局,适配环保设备、清洁技术等应用场景,通过可视化后台可快速搭建符合行业特性的展示网站。查看源码
分享笔记 (共有 篇笔记)
验证码:

本栏推荐