zoukankan      html  css  js  c++  java
  • wecent 搭建

    一,下载源码

      http://www.wecenter.com/downloads/

    二,编写nginx 配置文件

      

    [root@web01 conf.d]# pwd
    /etc/nginx/conf.d
    [root@web01 conf.d]# cat zhihu.conf 
    server {
           listen   80;
           server_name   www.zhihuqiang.com;
           location / {
                 root   /html/zhihu;
                 index  index.php index.html;
           }
           location ~ .php$ {
                 root   /html/zhihu;
                 fastcgi_pass  127.0.0.1:9000;
                 fastcgi_index index.php;
                 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                 include fastcgi_params;
    
           }
     }

    三,上传源码到站点目录 

    scp /Users/zhangqiang/Downloads/WeCenter.zip  root@10.0.0.7:/html/zhihu

    四,解压

    [root@web01 zhihu]# pwd
    /html/zhihu
    
    [root@web01 zhihu]#unzip WeCenter.zip
    
    [root@web01 zhihu]#mv WeCenter330/* ./

    五,数据库创建用户密码

    create database zhihu;
    
    grant all on zhihu.* to 'zhihu'@'localhost' identified by 'huhu8023'; 

    六,打开网页进行测试 

      发现目录权限都显示红叉 

      1,将php-fpm下的www.conf 文件中内容 属主属组改成nginx

      2,发现目录权限都是红叉 给站点目录nginx 权限

     

    [root@web01 html]#chown -R nginx.nginx zhihu/

     七,输入数据库账号密码 点击暗账

  • 相关阅读:
    apns libcurl
    apns libcurl
    epoll
    epoll
    Linux服务器压测
    Linux服务器压测
    libevent
    libevent
    shell脚本
    shell脚本
  • 原文地址:https://www.cnblogs.com/qiang-qiang/p/10552273.html
Copyright © 2011-2022 走看看