Create a directory for the project:

# mkdir epiClassifier
# cd epiClassifier

Copy epiClassifierForLinux.zip in this directory and unzip it:

# unzip epiClassifierForLinux.zip

If unzip is not installed already, install it

# apt-get install zip
# apt-get install unzip

Install NSPR

Create a directory:

# mkdir pr
# cd pr

According to NSPR build instructions:

Check out the source tree from CVS

# cvs -q -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r NSPR_4_8_RTM mozilla/nsprpub

Create a build directory:

# mkdir target.debug
# cd target.debug

Run the configure script (this is the place to specify some options if needed)

# ../mozilla/nsprpub/configure

Build the libraries

# make

Build epiClassifier

Come back to directory:

# cd ../..

And build epiClassifier:

# make

Launch

To start epiClassifier, it is enough to do:

# ./epiClassifier

However, when loging out, the task will automatically be killed because its parent process terminates. To have epiClassifier still run, it is necessary to use a special method of starting the process, for example nohup. With a remote connection, a commonly used method is to run the desired program with 'screen' ('screen programname'). Then the program seems to run normally (but it's actually running on screen), and when you want to exit, you can press CTRL+A, then D, to detach ("put the process in the back", make it disappear from the foreground but still have it run there on 'screen'), and just exit - and the process still runs. Later when you come back (maybe re-login remotely) you can run 'screen -d -r' which re-attaches (and possibly de-attaches the process first, if needed) to the process and you get it back to your screen.

# screen ./epiClassifier

CTRL+A, then D

Mysql setup

So far, epiClassifier opens a database connction at startup. Mysql must be configured so that this connection doesn't get timed out.

Edit my.cnf (with Debian distro, it is located in /etc/mysql directory)

max_connections        = 1500
max_user_connections   = 600
wait_timeout           = 259200

Usual errors

cannot find -lmysqlclient

Probably comes from missing libmysqlclient-dev package; install it:

# apt-get install libmysqlclient-dev

cannot find stubs-32.h

On a dual 32-bit/64-bit platform, NSPR build generates a 32-bit build by default. To generate a 64-bit build, specify the --enable-64bit configure option.

# ../mozilla/nsprpub/configure --enable-64bit

error while loading shared libraries: libnspr4.so: cannot open shared object file: No such file or directory

Copy libnspr4.so to common libs directory (usually /usr/lib).

# cp ./pr/target.debug/dist/lib/libnspr4.so /usr/lib/libnspr4.so