logo

Installing Time Tracker on SME Server

This manual describes the steps involved in installing Anuko Time Tracker on SME Server.

Software Versions

SME Server - version 8.0 (smeserver-8.0-i386.iso, md5sum 5ddf60589b91bf8596f3b7cf5394fe2c).
Anuko Time Tracker - version 1.5.106.2667.

Installing SME Server

Go to http://contribs.org and download the ISO for SME Server. Burn the ISO image to disk. Then, insert the CD into a test system and start the installation process.
  • At the boot prompt type sme and press Enter to start installing. To keep things simple, this manual assumes a fresh install of SME Server with the entire hard disk formatted and erased before install.
  • Use default settings during the installation process.
  • Remove the CD and reboot the server at the end of installation.
  • Server configuration
    • Use mycompany.local for the primary domain name.
    • Select a name for the server, I used testsystem.
    • IP address - i used 192.168.1.200 so that it could be reached form other local computers for testing. Subnet mask 255.255.255.0.
    • Operation mode - Server-only.
    • Do not provide DHCP service.

That's it. After the setup is complete, you can check whether Apache is running there by accessing it from another computer in browser to see something like this:

Accessing SME Server from another system in browser after install
Accessing SME Server from another system in browser after install


As you can see, there is nothing there. To install a web application, we need to create an information bay.

Create an Information Bay for Time Tracker

You can do it from SME Server via its text based browser but it's easier from a full browser from an external system.

If you need to do it on SME Server: login to it as admin (not root) with root password and select option 6 - Access server manager in Server console. Login to it as admin with root password as well.

If configuring from an external browser point it to its server-manager sub-directory.

SME Server - Information Bays screen in Server Manager
SME Server - Information Bays screen in Server Manager


Click the Add i-bay button to add a new information bay and provide the following parameters:
  • Information bay name - timetracker
  • Description - Time Tracker app
  • Group - Everyone
  • User access via file sharing or user ftp: Write = admin, Read = group
  • Public access via web or anonymous ftp - Entire Internet (no password required)
  • Execution of dynamic content (CGI, PHP, SSI) - Enabled


Adding an information bay for Time Tracker
Adding an information bay for Time Tracker


Now we can access the timetracker sub-directory, which is empty:

Empty timetracker directory for Time Tracker application
Empty timetracker directory for Time Tracker application


Download Time Tracker Code

At this step we download Time Tracker code and deploy it in the time tracker sub-directory. Here is how I did it:
  • Log in at SME server as root.
  • Find the location of the timetracker directory using the command:
find / -name timetracker

  • Change to this directory.
cd /home/e-smith/files/ibays/timetracker/

  • Inside it, there is an sub-directory called html with only one file index.html inside. Remove the file and directory.
rm -rf html

  • Download Time Tracker code.
wget -c https://www.anuko.com/download/time_tracker/time_tracker.zip

  • Unpack the downloaded anuko_tim_tracker.zip. This will create a new directory called timetracker.
unzip time_tracker.zip

  • Rename the timetracker directory to html to match what you had before.
mv timetracker html

By this point we have unpacked Time Tracker files in the required location.

Configuring Time Tracker

  • Change permissions on Time Tracker's WEB-INF/template_c/ directory to 777
cd html/WEB-INF
chmod 777 template_c

  • Make a configuration file for Time Tracker by copying it from WEB-INF/config.php.dist
cp config.php.dist config.php

  • Edit the following two lines in config.php so that they look similar to this:
define('DSN', 'mysql://ttuser:ttpass@localhost/timetracker');
define('APP_NAME', 'timetracker');
Here, the parameters are:
  • ttuser - MySQL user to access the database (we have not created it yet, see next steps).
  • ttpass - password.
  • timetracker - database name (we have not created it yet, see next steps).
By this point we can have Time Tracker to display the login page, but it is still not yet functional because there is no database.

Time Tracker login screen after completing the installation steps above
Time Tracker login screen after completing the installation steps above


Create a Database for Time Tracker

In SME Server console, enter MySQL console:
mysql
And then, in MySQL console, create timetracker database:
create database timetracker character set = 'utf8';
Grant permissions to ttuser:
grant all on timetracker.* to ttuser@localhost identified by 'ttpass';

Populate Time Tracker database

By this point the database and user credentials to access it are created, and we can initialize the database as per Time Tracker install guide. To do that, we open dbinstall.php in browser and execute the Create step.

Populating Time Tracker database with dbinstall.php
Populating Time Tracker database with dbinstall.php


That's it! You can now use Time Tracker.

Time Tracker installed and working on SME Server
Time Tracker installed and working on SME Server


Define a Temporary Directory

With the configuration achieved above you can start using Time Tracker. However, one problem still remains. If you try to import a team to this server as described here you may see a File upload error when trying to import the data from an XML file.

It happens because the file cannot be saved after uploading to SME server because a temporary directory is not set. To resolve this problem, you can use the technique described here by creating a file /etc/e-smith/templates-custom/etc/php.ini/12phptmpfolder with the following one line in it:
upload_tmp_dir = /tmp
and then executing in server console
signal-event console-save