需要配置阿里云源,epel源
安装不做赘述自行百度
编辑主配置文件/etc/nginx/nginx.conf
在46行插入
此行文件从/etc/nginx/nginx.conf.default中复制即可
location ~ \.php$ {
#root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME 此处修改为42行root后的路径$fastcgi_script_name;
include fastcgi_params;
}
在43行插入
index index.php;
重启服务并设置开机自启
systemctl restart nginx
systemctl enable nginx
systemctl restart php-fpm
systemctl enable php-fpm
去Discuz官网下载源码 https://www.discuz.net/ 上传到服务器解压 unzip Discuz文件
mv ./upload/* /usr/share/nginx/html/
chmod -R 777 /usr/share/nginx/html/