Install Tracmor on LAMP (ubuntu 12.04 LTS)

1. Install ubuntu 12.04

2. Install LAMP, ref:

$ sudo apt-get install tasksel
$ sudo tasksel install lamp-server

3. Configure LAMP, ref:

$ sudo usermod -a -G www-data 
$ sudo chgrp -R www-data /var/www
$ sudo chmod -R g+w /var/www

log out and log in to reflect changes, also install the extra


$ sudo apt-get install php5-curl

Mod rewrite:

$ sudo a2enmod rewrite

GD2 Graphics Lib:

$ sudo apt-get install php5-gd


$ sudo apt-get install php5-xsl

4. download Tracmor from Github, extract the file to /var/www

5. open MySQL, create database ‘tracmor’ source ‘create.sql’ and ‘data.sql’ in folder /data_model

6. setup in folder /includes, ref: INSTALL in tracmor folder.

Remember to put ‘/var/www’ in __DOC_ROOT__ , and put ‘/<tracmor folder name>  in __SUBDIRECTORY__.

change // Location of tmp directory as DEFINE(‘__TRACMOR_TMP__’, __SUBDIRECTORY__ . ‘/tmp’);

Useful Command:

Restart Apache

$ sudo service apache2 restart

Trouble Shooting

1. If there’s something wrong about PHP, reinstall PHP 5

$ sudo apt-get install libapache2-mod-php5

Enable this module by doing

$ sudo a2enmod php5

2. If you have this error

apache2: Could not determine the server’s fully qualified domain name, using for ServerName

then use a text editor such as “sudo nano” at the command line to create a new file,

$ sudo nano /etc/apache2/conf.d/fqdn

then add

ServerName localhost

to the file and save. This can all be done in a single command with the following:

$ echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdn

3. If you happen to encounter this error after signing out

dir(/tmp,/tmp) [function.dir]: The system cannot find the file specified. (code: 2)

add this line to the file “” in folder /includes/:

QFileFormStateHandler::$StatePath = "your path to/Tracmor";