Asqatasun v4 - Summary

Asqatasun v4 - Prerequisites for Asqatasun-Runner

Open JDK

You need to have a JDK and JRE installed. openjdk-7-jre and openjdk-7-jdk are suggested. Install the following packages

sudo aptitude install openjdk-7-jre
sudo update-java-alternatives -s java-1.7.0-openjdk

Mysql

Installation

Install the following packages

sudo aptitude install mysql-server-5.5 libmysql-java

Configuration

Edit the my.cnf mysql configuration file.

sudo vi /etc/mysql/my.cnf

Set the max_allowed_packet option to 64M (default is 16M)

max_allowed_packet = 64M

Restart mysql service

sudo service mysql restart

Xvfb

Install the following packages

sudo aptitude install xvfb

Create the startup script in /etc/init.d/xvfb-asqatasun-runner

sudo touch /etc/init.d/xvfb-asqatasun-runner

Add the following content to the xvfb startup script. Don't forget to replace the $My_User string with the name of the user that will perform the analysis (jenkins for instance)

#!/bin/sh

set -e

RUN_AS_USER=$My_User
OPTS=":99 -screen 1 1024x768x24 -nolisten tcp"
XVFB_DIR=/usr/bin
PIDFILE=/var/run/xvfb-asqatasun-runner

case $1 in

start)
    start-stop-daemon --chuid $RUN_AS_USER -b --start --exec $XVFB_DIR/Xvfb --make-pidfile --pidfile $PIDFILE -- $OPTS &
;;

stop)
    start-stop-daemon --stop --user $RUN_AS_USER --pidfile $PIDFILE
    rm -f $PIDFILE
;;

restart)
    if start-stop-daemon --test --stop --user $RUN_AS_USER --pidfile $PIDFILE >/dev/null; then
        $0 stop
    fi;
    $0 start
;;

*)
    echo "Usage: $0 (start|restart|stop)"
    exit 1
;;

esac

exit 0

start Xvfb

sudo chmod +x /etc/init.d/xvfb-asqatasun-runner
sudo /etc/init.d/xvfb-asqatasun-runner start

Configure Xvfb to run at startup

sudo update-rc.d xvfb-asqatasun-runner defaults

Firefox

 For 32-bit architecture

Retrieve the lastest esr version of firefox. Install it on your file system and make sure the binary is executable for the user that will perform the analysis (jenkins for instance)

cd /opt
sudo wget http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/31.4.0esr/linux-i686/en-US/firefox-31.4.0esr.tar.bz2
sudo tar xvfj firefox-31.4.0esr.tar.bz2
sudo mv firefox firefox-31.4.0esr
sudo ln -s firefox-31.4.0esr firefox

 For 64-bit architecture

Retrieve the lastest esr version of firefox. Install it on your file system and make sure the binary is executable for the user that will perform the analysis (jenkins for instance)

cd /opt
sudo wget http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/31.4.0esr/linux-x86_64/en-US/firefox-31.4.0esr.tar.bz2
sudo tar xvfj firefox-31.4.0esr.tar.bz2
sudo mv firefox firefox-31.4.0esr
sudo ln -s firefox-31.4.0esr firefox