在CentOS7已有nginx下安装Discuz

一、php是Discuz的先决条件,相关组件先装上;

      至于必须的mysql,CentOS7中有自带的mariadb版,不必管它。

#yum install php

#yum install php-fpm

#yum install php-mysql

 

二、把Discuz下下来,解开、放好

#mkdir /discuz

#cd /discuz

#wget https://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_UTF8.zip

#unzip Discuz_X3.2_SC_UTF8.zip

#mv upload/* ./

#rm -rf upload/

#rm -rf Discuz_X3.2_SC_UTF8.zip

 

三、重新配一下nginx

#vim .....nginx/conf/nginx.conf

##在http块中新增一个server

server {

    listen 8041;  ##另设一个,和原有的端口区分开

    server_name www.ceshiyuming.com;

    index index.html index.htm index.php;

    root /discuz;

    location ~ \.php$ {

         include fastcgi_params;

         fastcgi_pass 127.0.0.1:9000;

        fastcgi_index index.php;

        fastcgi_param SCRIPT_FILENAME /discuz$fastcgi_script_name;

    }

 }

 

四、设置一下/discuz的主人和权限(用哪个用户及组,看nginx.conf的前几行)

#chown -R  abc:abc /discuz

#chmod -R 755 /discuz

 

五、浏览器访问

http://www.ceshiyuming.com:8041/install

开装吧

 

上一篇:2021-06-03


下一篇:树莓派 LNMP