您现在的位置是:首页 > 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内核开发的驾校培训专用网站模板,深度适配驾驶培训行业展示需求。采用PC与移动端同步响应设计,单一后台统一管理内容数据,更换图文素材后可快速转变为其他行业网站。查看源码
  • (PC+WAP)蓝色五金机械设备营销型网站源码下载基于PbootCMS内核开发的营销型企业网站模板,为五金机械设备类企业打造,通过标准化数字展示提升客户转化率。模板采用模块化设计,可快速适配机床工具、建筑五金、阀门管件等细分领域。查看源码
  • (自适应多语言)WordPress开源主题MirageV资讯个人博客源码MirageV资讯类个人博客主题源码/WordPress主题/全开源MirageV 是一款开源的 WordPress 主题,支持自适应、暗黑模式、多语言等功能,查看源码
  • (自适应响应式)绿色环保材料设备科技类营销型网站pbootcms源码下载本模板基于PbootCMS开发,主要面向环保设备、环保材料及相关科技企业。采用HTML5+CSS3技术构建,具备响应式特性,确保在各类设备上均有良好展示效果。查看源码
  • (自适应)蓝色厨卫厨房水龙头阀门水槽设备源码下载基于PbootCMS内核开发,深度适配厨卫设备行业特性。通过精准的产品展示模块与水效标识专区设计,有效呈现五金件工艺细节。响应式布局确保从手机到平板都能展示金属质感与水流动态效果。查看源码
  • (PC+WAP)红色家装设计智能家居家具建材pbootcms网站源码下载本模板基于PbootCMS系统开发,为智能家居、家装设计及家具建材行业设计。采用现代化布局风格,突出家居设计行业特色,适合展示各类家居产品、设计方案和建材信息。查看源码
分享笔记 (共有 篇笔记)
验证码:

本栏推荐