• LNMP平台中部署WEB应用(部署ComsenzDiscuz BBS论坛系统)


    上传软件包

    ComsenzDiscuz-DiscuzX-master.zip 

    unzip ComsenzDiscuz-DiscuzX-master.zip (使用unzip解压)

    cd DiscuzX/  (进入解压目录)

    mv upload/ /usr/local/nginx/html/bbs  (上传bbs代码)

    浏览器访问http://192.168.200.111/bbs/install/index.php

    设置权限及模板文件

     cd /usr/local/nginx/html/bbs/config/

    cp config_global_default.php config_global.php

    cp config_ucenter_default.php config_ucenter.php

    (偷懒做法,批量给权限,实际生产不可.目录位置在/usr/local/nginx/html/bbs

    cd /usr/local/nginx/html/bbs

    chmod -R 777 config/ data/ uc_client/ uc_server/

    准备数据库并配置相关授权

    mysql -uroot -p123456  (登陆mysql数据库)

    mysql> create database bbs;  (创建一个库)

    mysql> grant all on bbs.* to 'bbs'@'localhost' identified by 'bbs123456';  (对bbs下的所有表授予所有权限,用户名为bbs,密码为123456)

    mysql> flush privileges;  (刷新这条命令,刷新授权表使生效)

    修改nginx主配置文件,达到输入域名或IP直接进入论坛,无需添加URI路径(红色部分为修改添加)

    vim /usr/local/nginx/conf/nginx.conf

     location / {

                root   html/bbs;

    index  index.php index.html index.htm;

            }

     

    location ~ .php$ {

        root html/bbs;

    fastcgi_pass 127.0.0.1:9000;

    fastcgi_indexindex.php;

                include fastcgi.conf;

    }

     

  • 相关阅读:
    NHibernate4使用Oracle.ManagedDataAccess.dll连接oracle及配置多个数据库连接
    Myeclipse闪退故障
    Log4j快速使用精简版
    Eclipse快捷键 10个最有用的快捷键
    Java compiler level does not match解决方法
    ArcMap常用VBA
    firefox浏览器中silverlight无法输入问题
    C#导入Excel遇到数字字母混合列数据丢失解决
    ArcMap计算PolyLine中点VBA
    Apple Watch 开发详解
  • 原文地址:https://www.cnblogs.com/shinian12138/p/11527632.html
Copyright © 2020-2023  润新知