Ubuntu prerequisites (Tanaguru 3.x)

mfaure's picture

Here are the prerequesites you have to fulfill before installing Tanaguru 3.x on Ubuntu.

This procedure have been validated on Ubuntu 12.04 LTS distribution.

Update repositories

Edit the /etc/apt/sources.list file

sudo /usr/bin/editor /etc/apt/sources.list

Uncomment the following lines :

deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner

Ensure the machine is up to date.

sudo aptitude update
sudo aptitude safe-upgrade

Open JDK

sudo apt-get install openjdk-6-jre
sudo update-java-alternatives -s java-1.6.0-openjdk

Locale

Locale and locale-gen

Verify the locale with

locale -a

You must have a something different from C and POSIX. This means, if you already have C and POSIX, you must have a third locale defined. If not, add another one (let say fr_FR.UTF-8):

sudo locale-gen fr_FR.UTF-8

Please verify again your locale definition with

locale -a

Lang

Verify the locale definition:

cat /etc/default/locale

You must have something different from LANG="C", which could be "fr_FR.UTF-8", or "fr_CA.UTF-8", or "en_GB.UTF-8"...

Unzip

sudo aptitude install unzip

Mysql

Installation

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 16M (default is 1M)

max_allowed_packet      = 16M

Restart mysql service

sudo service mysql restart

Tomcat

sudo aptitude install tomcat6 libspring-instrument-java
sudo ln -s /usr/share/java/spring3-instrument-tomcat.jar /usr/share/tomcat6/lib/spring3-instrument-tomcat.jar
sudo ln -s /usr/share/java/mysql-connector-java.jar /usr/share/tomcat6/lib/mysql-connector-java.jar

XVFB

sudo aptitude install xvfb

Create the startup script in /etc/init.d/xvfb

sudo touch /etc/init.d/xvfb

Add the following content to the xvfb startup script.

#!/bin/sh

set -e

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

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
sudo /etc/init.d/xvfb start

Configure xvfb to run at startup

sudo update-rc.d xvfb defaults

Firefox

For 32-bit architecture

Retrieve the version 24.0esr of firefox.

Install it on your file system and make sure the binary is executable for the user tomcat

cd ~
wget http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/24.0esr...
sudo cp firefox-24.0esr.tar.bz2 /opt
sudo cd /opt
tar xvfj firefox-24.0esr.tar.bz2

For 64-bit architecture

Retrieve the version 24.0esr of firefox.

Install it on your file system and make sure the binary is executable for the user tomcat

cd ~
wget http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/24.0esr...
sudo cp firefox-24.0esr.tar.bz2 /opt
sudo cd /opt
tar xvfj firefox-24.0esr.tar.bz2

Mail SMTP

sudo aptitude install postfix mailutils

sudo dpkg-reconfigure postfix

Once the configuration is displayed, options are :

  • configuration type: satellite
  • SMTP relay: <none> (this is the trick, don't type anything here)

Next step

Now you will be able to install Tanaguru 3.x on Ubuntu.