Step-by-step Installation

Instalation instructions on how to set-up your vhost with the dashboard

This instructions are only suggestions. There are many different ways to create vhost etc.
I assume that you have apache2 running and PHP (>=5.3.0) installed and configured with apache.

$ php -v
PHP 5.3.15 (cli)...

$ sudo service apache2 status

$ apachectl -M | grep php
php5_module (shared)

Apache Vhost

Apache and vhost

First we will setup vhost for your local dashboard installation. Start with creating new folder /var/www/ ad new vhost config in /etc/apache2/sites-available/

# create vhost folder
sudo mkdir /var/www/
sudo chown `whoami`:_www /var/www/

# ... now logs folder
mkdir /var/www/
chmod 775 /var/www/

# htdocs with some test page
mkdir /var/www/
chmod 775 /var/www/
echo "Hello Dashboard Vhost" > /var/www/

# and let's add dashboard domain
sudo bash -c 'echo "" >> /etc/hosts'
<VirtualHost *:80>
    DocumentRoot /var/www/

    Alias /dashboard /var/www/

    # Apache Logs
    LogLevel warn
    ErrorLog /var/www/
    CustomLog /var/www/ combined

    <Directory "/">
        Options            Indexes FollowSymLinks
        AllowOverride      None
        Order              allow,deny
        Allow              from all

    <Location />
        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /index.php


And finally restart Apache.

sudo service apache2 restart

you should now get "Hello Dashboard Vhost".

Install Dashboard

PHP Composer - dependency manager

cd /var/www/
curl -sS | php

now create composer.json

echo '{
    "require": {
        "php": ">=5.3.0",
        "hoborglabs/dashboard": "1.1.*",
        "hoborglabs/widgets": "*"
}' > /var/www/

and install!!

./composer.phar update

Now we have all the PHP source files. We just have to use it :)

echo "<?php
require_once __DIR__ . '/../vendor/autoload.php';
\$kernel = new \Hoborg\Dashboard\Kernel(__DIR__ . '/..', 'dev');
\$kernel->addExtensionPath(__DIR__ . '/../boards/demo');
\$kernel->handle(array_merge(\$_GET, \$_POST));" > /var/www/
# and remove old index.html
rm /var/www/
# ... and create demo board folder
mkdir -p /var/www/
cd /var/www/ && mkdir config widgets templates data