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";

One thought on “Install Tracmor on LAMP (ubuntu 12.04 LTS)

  1. Also tried to install Tracmor (Github master, around v0.4.0) on Windows 7 with IIS/PHP/MySQL. Tons of trouble and unknown amount of compatibility issues. You will encounter path error problem on tmp folder, could fix by adding a declaration on a prepend php. A thread on Tracmor forum has detail and solution. After that, you will encounter Moneyformat issue due to the PHP code used is Linus based, need to rewrite the corresponding code. Stop trying from here. So conclusion, for fresh installation, just go for LAMP.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s