部署TaskBoard

部署TaskBoard

快捷脚本(Debian系)

php+Nginx

cd /
sudo git clone https://github.com/kiswa/TaskBoard.git
cd TaskBoard
./build/composer.phar install
#sudo apt-get install openjdk-7-jre;cd /TaskBoard/build;./build-all
sudo chown -R www-data:www-data /TaskBoard

sudo apt-get install nginx
sudo apt-get install php5 php5-fpm php-apc php5-curl php5-cli php-pear php5-gd -y
sudo apt-get php5-sqlite  sqlite3 -y

./build/composer.phar install提示

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing firebase/php-jwt (1.0.0)
    Downloading: 100%         

  - Installing gabordemooij/redbean (v4.2.0)
    Downloading: 100%         

  - Installing ircmaxell/password-compat (v1.0.4)
    Downloading: 100%         

  - Installing phpmailer/phpmailer (v5.2.14)
    Downloading: 100%         

  - Installing slim/slim (2.6.1)
    Downloading: 100%         

phpmailer/phpmailer suggests installing league/oauth2-client (Needed for XOAUTH2 authentication)
phpmailer/phpmailer suggests installing league/oauth2-google (Needed for Gmail XOAUTH2)
slim/slim suggests installing ext-mcrypt (Required for HTTP cookie encryption)

php-fpm sock路径:

/var/run/php5-fpm.sock;

查看php-fpm状态:

netstat -alnp | grep LISTEN | grep php

重启php-fpm:

sudo kill -USR2 `cat /run/php5-fpm.pid`

Nginx配置:

参考了 Issue #117 · kiswa/TaskBoard

server {
    listen 8000 default_server;

    root   /TaskBoard/;
    index index.php index.html;

    # Make site accessible from http://localhost/
    server_name localhost;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location /api {
        if (!-e $request_filename) {
            rewrite ^(.*)$ /api/api.php last; break;
        }
    }

    location /api/taskboard.db {
        rewrite ^(.*)$ /api/api.php last; break;
    }

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_index index.php;
        include fastcgi.conf;
    }
}

Note

PHP学习笔记整理

转载于:https://www.cnblogs.com/weaming/p/5222204.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值