zoukankan      html  css  js  c++  java
  • Discuz论坛安装全过程

    1.安装php
    yum install php php-fpm php-mysql -y
    启动
    service php-fpm start

    systemctl start php-fpm

    2.解压Discuz_X3.4_SC_UTF8【20191201】.zip并复制到/home/www/discuz/public目录
    unzip Discuz_X3.4_SC_UTF8【20191201】.zip
    cp -r upload/* /home/www/discuz/public
    chmod -R 777 /home/www/discuz/public

    3.nginx配置:

    http {
    include mime.types;
    default_type application/octet-stream;
    gzip on;
    gzip_min_length 1024;
    gzip_types text/css application/x-javascript application/vnd.api+json;
    gzip_disable “MSIE [1-6].”;
    gzip_comp_level 2;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';
    
    #access_log  logs/access.log  main;
    
    sendfile        on;
    #tcp_nopush     on;
    
    #keepalive_timeout  0;
    keepalive_timeout  65;
    
    #gzip  on;
    
    server {
        listen       80;
        server_name  localhost;
        root   /home/www/discuz/public;
        index  index.php;
        #charset koi8-r;
    
        #access_log  logs/host.access.log  main;
    
        #location / {
        #    try_files $uri $uri/ /index.php?$query_string;
        #}
        location ~ .php$ {
                include fastcgi_params;
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME /home/www/discuz/public$fastcgi_script_name;
        }
    
        #error_page  404              /404.html;
    
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    
        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ .php$ {
        #    proxy_pass   http://127.0.0.1;
        #}
    
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ .php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}
    
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /.ht {
        #    deny  all;
        #}
    }
    
    
    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;
    
    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
    
    
    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;
    
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;
    
    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;
    
    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;
    
    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
    

    }

    4.访问IP/install地址
    在这里插入图片描述
    我同意,下一步。
    在这里插入图片描述
    下一步
    在这里插入图片描述
    下一步
    在这里插入图片描述
    如果数据库服务器端口不是3306那么我们就填ip:端口。

  • 相关阅读:
    求每天的收入和支出
    行列 转换 合并 分拆
    用户消费总金额 2000以下 20004000 40006000 查询连续数字,统计个数
    txt文件分割导入数据库
    字符串分割函数拆分成多行
    如何向一个自增字段插值
    sql中带in条件的查询及提高效率
    逐行计算、逐行递延、逐行更新
    SQL2005实现全文检索的步骤 停止数据库的用户连接
    查字段指定数据后一行记录
  • 原文地址:https://www.cnblogs.com/javakfz/p/13938227.html
Copyright © 2011-2022 走看看