$ apt-get update
$ apt-get --assume-yes install apache2
$ apt-get --assume-yes install apache2-dev
$ apt-get --assume-yes install apache2-utils
$ apt-get --assume-yes install libcurl4-openssl-dev libssl-dev
$ apt-get --assume-yes install python3
$ apt-get --assume-yes install python3-dev
$ apt-get --assume-yes install python3-pip
$ apt-get --assume-yes install git
$ apt-get --assume-yes install sqlite3
$ apt-get clean

We will need to host Python web applications in our Apache Server so to facilitate that let's install the mod_wsgi module.

$ pip3 install mod-wsgi

Attach the wsgi module to Apache's available modules

$ echo 'LoadModule wsgi_module "/usr/local/lib/python3.5/dist-packages/mod_wsgi/server/"' > /etc/apache2/mods-available/wsgi.load

If you have trouble with persmissions try:

$ echo 'LoadModule wsgi_module "/usr/local/lib/python3.5/dist-packages/mod_wsgi/server/"' | sudo tee /etc/apache2/mods-available/wsgi.load

Enable the wsgi module for Apache.

$ a2enmod wsgi

Now let's clone all the relevant scource code. This tutorial will clone it into the root directory by default.

$ cd /root
$ git clone -b development
$ git clone -b development
$ git clone -b development
$ git clone -b development

Next we'll install the modules from the source code with pip3 so that they can be used in python

$ cd /root/luxon
$ pip3 install -r requirements.txt
$ pip3 install .
$ cd /root/psychokinetic
$ pip3 install .
$ cd /root/photonic
$ pip3 install .
$ cd /root/infinitystone
$ pip3 install .

Now it's time to deploy Photonic and Infinitystone in our Apache webserver We'll navigate to /var/www and make directories Infinitystone and Photonic

$ cd /var/www
$ mkdir infinitystone
$ mkdir photonic

First let's deal with Infinitystone:

We will use luxon to install Infinitystone with the -i command

$ luxon -i infinitystone infinitystone

Luxon can also set up the database for Infinitystone by using the -d command

$ luxon -d infinitystone

Set the user and group to www-data

$ chown -R www-data:www-data infinitystone

And set the permissions for the database file

$ chmod 770 infinitystone/sqlite3.db

We need to rename the database to tachyon

$ mv infinitystone/sqlite3.db infinitystone/tachyon

The Infinitystone installation needs a copy of the settings.ini and policy.json files which. So we will create symbolic links to the original files to get around this.

$ ln -s /root/infinitystone/infinitystone/settings.ini infinitystone/settings.ini
$ ln -s /root/infinitystone/infinitystone/policy.json infinitystone/policy.json

Now let's repeat the process for Photonic:

Install with Luxon.

$ luxon -i photonic photonic

The Photonic installation creates a file: static incorrectly, we need to remove and replace with a symbolic link to the file in the source code

$ rm -rf photonic/static
$ ln -s /root/photonic/photonic/static/ photonic/static

And as before link to the settings.ini/policy.json files

$ ln -s /root/photonic/photonic/settings.ini photonic/settings.ini
$ ln -s /root/photonic/photonic/policy.json photonic/policy.json

Both modules need tmp directories to store session data

$ mkdir infinitystone/tmp
$ mkdir photonic/tmp

Set the user:group for those to www-data as well

$ chown -R www-data:www-data infinitystone/tmp
$ chown -R www-data:www-data photonic/tmp

Both modules need a pki certificate. We'll create it in Infinitystone

$ cd /var/www/infinitystone
$ openssl req  -nodes -new -x509  -keyout token.key -out token.cert -subj "/C=ZA/ST= /L= /O= /OU= /CN= "

And we'll just link it to Photonic

$ ln -s ../infinitystone/token.cert ../photonic/token.cert

We will give Photonic's static dirctory to the webserver so that we can interface with Tachyonic via a browser. Again with a symbolic link

$ ln -s /root/photonic/photonic/static/ /var/www/html/static

Finally download a sample apache .config file, give it to our web server and reload Apache for this new file to take effect

$ cd /etc/apache2/sites-enabled/
$ wget
$ sudo service apache2 reload

At this point we should have a working instilation of Photonic. To view it browse to and log in with

username: root
password: password