Chapter 14. Installation

Table of Contents

Putting the files in place
Apache configuration
Orbited and TwoSpot backend server.
Running the installation script
Configuration files
Setting up the database
Checking the installation

To install you will need a LAMP server running. You will need access to the file system and root access to the MySQL database. In theory WAMP should work, but it hasn't been tested. LAMP stands for Linux/Apache/MySQL/PHP and WAMP is the same but Windows instead. PHP will have to be configured to work with both MySQL and Apache.


If you want to use all functions you cannot use safe mode in PHP. Affected functions are file uploads and PDF generation. You have to set open_ basedir so it can access the /tmp/ directory for both.

Putting the files in place

Once you have the files downloaded, copy them to the location you have chosen that matches your apache configuration. Run the script to set file permissions on a few files that will be updated by the install process. You can place the files in a virtual host section that specifies a new root when used from a browser, or in a directory in an already configured apache section. The system used relative paths so it can be placed in any relative location.

Create a database to use by starting a MySQL client and entering "create database twospot" or any name if twospot isn't suitable. Then create a user that has full access to that database, "grant all on twospot.* to twospot@localhost identified by 'secretpassword'". Please choose a decent password for this user.

Apache configuration

There needs to be an apache configuration section in some form, below is an example using a virtual host. The proxy setup is required for Orbited to work properly, see the chapter on Orbited for more information. Note that for the Proxy configuration to work, both the Proxy and the Proxy_html submodules must also be activated in Apache. In Debian systems a2enmod Proxy and a2enmod Proxy_html should do the trick.

Example 14.1. Virtual host example

<VirtualHost *:80>
    DocumentRoot /var/lib/2spot/ 
    ServerName two-spot
    ProxyRequests on
    ProxyPreserveHost Off
    ProxyPass /tcp http://localhost:8000/tcp
    <Proxy *>
       Order deny,allow
       Allow from all

Orbited and TwoSpot backend server.


This is not required for simple usage, but to take full advantage of the system it is recommended.

Orbited is used for heartbeats, banners and messages that needs to be sent without interaction directly from the user. If not included with the operating system it can be downloaded from The default configuration should be sufficient, but note that TwoSpot uses port 8000 for normal communication and required the Stomp protocol to be available on port 61613, so the following setup has to exists.


* -> localhost:8000
* -> localhost:61613

The stomp:// line will activate the built-in Morbidq module that handles the Stomp protocol. It should also be possible to run rabbitmq as a message server instead of morbidq however.

Once the configuration is done, start orbited by running it as a service according to the instructions on

To have any use of Orbited, a TwoSpot server also has to be run, There should be a script for that and better instructions, but for now simply go to the heartbeat directory and write "php backend.php" to start it up.