Skip to content
Ilyas Salikhov edited this page Mar 19, 2014 · 12 revisions

Intaro Pinboard requires:

  • PHP 5.3.3 or later
  • APC Cache
  • MySQL with Pinba plugin and database created by pinba

Download application:

$ git clone git://github.com/intaro/pinboard.git
$ cd ./pinboard

Download composer

$ curl -sS https://getcomposer.org/installer | php

Install dependencies

Install dependency libraries throw composer:

$ php composer.phar install

Define DB connection settings

Create configurating file and enter parameters of connection to Pinba database:

$ cp config/parameters.yml.dist config/parameters.yml
$ nano config/parameters.yml

Initialize app

Run command:

$ ./console migrations:migrate
$ ./console register-crontab

Command will create additional tables and will define crontab task. Command ask you for a period of crontab task running. Important! You must set period equal pinba_stats_history setting of Pinba. For example pinba_stats_history equal 900 (seconds). Correspondently you must enter 15 (minutes).

Make Pinboard visible from web

Point the document root of your webserver or virtual host to the web/ directory. Read more in Silex documentation.

Example for nginx + php-fpm:

server {        
    listen 80;
    server_name pinboard.site.ru;
    root /var/www/pinboard/web;

    #site root is redirected to the app boot script
    location = / {
        try_files @site @site;
    }

    #all other locations try other files first and go to our front controller if none of them exists
    location / {
        try_files $uri $uri/ @site;
    }

    #return 404 for all php files as we do have a front controller
    location ~ \.php$ {
        return 404;
    }

    location @site {
        fastcgi_pass unix:/tmp/php-fpm.sock;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root/index.php;
        fastcgi_param HTTPS $https if_not_empty;
    }

    location ~ /\.(ht|svn|git) {
        deny  all;
    }
}
Clone this wiki locally