• log out

New apps

First, let's practice creating a new app from a Qbix template. Copy an app template somewhere, and configure it with your app's name:

cp -r Q/MyApp First
php First/scripts/Q/configure.php First

This replaces all instances of MyApp with First, and copies First/local.sample to First/local.

Installing apps

Now, create a new database in MySQL and grant permissions to all tables like so:

CREATE DATABASE First CHARACTER SET = utf8;
GRANT ALL ON First.* TO 'first'@'localhost'
IDENTIFIED BY 'somepassword';

Install the app with the command:

php First/scripts/Q/install.php --all

This creates the database tables for the app and all its plugins, makes some directories writable, and adds some symbolic links in First/web/Q/plugins.

Setting up your webserver

Since Qbix apps are written in PHP on the server side, you will need a php-enabled webserver to host them to the web. If you have Apache, set up a virtual host something like this:

<VirtualHost *:80>
    ServerName first.com
    DocumentRoot /projects/First/web
    <Directory /projects/First/web>
        Options FollowSymLinks
        AllowOverride All
    </Directory>
    ErrorLog logs/first-error-log
    CustomLog logs/first-access-log common 
</VirtualHost>

The .htaccess file in the web folder should take care of the rest.

If you have NGiNX, things are more complicated. We will assume you already integrated PHP in a configuration file called php.inc, and the basic server code in listen.inc . Then the virtual host directive will look something like this:

server {

include listen.inc;

server_name first.com;
access_log  /var/log/nginx/first.access.log;
error_log /var/log/nginx/first.error.log;

root   /projects/First/web;
include php.inc;

location /blog {
    index index.html index.php;
    try_files $uri $uri/ /blog/index.php?q=$uri;
}
location / {
    index index.html index.php;
    try_files $uri $uri/ /index.php$is_args$args;
}

}