Languages

Installation Ubuntu

This page describes the steps to follow to install Tanaguru from Version 1.4.1 from the binary files or from the sources.

The sofware has been tested on both Ubuntu 8.04 LTS (Hardy Heron) and Ubuntu 10.04 LTS (Lucid Lynx).

Technical prerequisites

Please ensure you meet all prerequisites for Tanaguru on Ubuntu.

Fetching Tanaguru tarballs

Download the Tanaguru Application and the Tanaguru Rules tarball (tar.gz AND war) packages for your architecture from the tanaguru's repository and the tanaguru-rules' repository.

Unpack the packages

Once you've downloaded or build the packages, unpack them by entering the following the command line :
tar xzf tanaguru-<version>.<architecture>.tar.gz
tar xzf tanaguru-rules-<version>.<architecture>.tar.gz

Source Code highlighter (Geshi)

sudo mkdir /var/www/geshi
cd tanaguru-<version>.<architecture>
sudo cp -r install-web-app/geshi/* /var/www/geshi

The Source Code Highlighter will be available on http://localhost/geshi/ (this will be used for Tanaguru configuration)

Tanaguru mysql user and database

Edit tanaguru-10-create-user-and-base.sql file and replace all stars '*********' with the desired password for your tanaguru mysql user.

cd tanaguru-<version>.<architecture>
vi install/tanaguru-10-create-user-and-base.sql

Run this sql script with mysql root user:

cd tanaguru-<version>.<architecture>
mysql -u root -p <install/tanaguru-10-create-user-and-base.sql

Create database structure and content :

cd tanaguru-<version>.<architecture>
mysql -u tanaguru -p <install/tanaguru-20-create-tables.sql
mysql -u tanaguru -p <install-web-app/sql/tgol-20-create-tables.sql
mysql -u tanaguru -p <install-web-app/sql/tgol-30-insert.sql

Create database structure and content, now for the rules :

cd tanaguru-rules-<version>.<architecture>
mysql -u tanaguru -p <install/tanaguru-30-insert.sql

Tanaguru librairies

sudo mkdir /var/lib/tanaguru
sudo chmod 655 /var/lib/tanaguru

Copy tanaguru-rules libraries to this new directory /var/lib/tanaguru

cd tanaguru-rules<version>.<architecture>
sudo cp lib/accessiweb2.1-<version>.jar /var/lib/tanaguru
sudo ln -s /var/lib/tanaguru/accessiweb2.1-<version>.jar /var/lib/tanaguru/accessiweb2.1.jar

Tanaguru "Web Application"

Tanaguru can be deployed as a web application, which allows you to run and display Tanaguru from a web browser with all the benefits of a rich interface.

Configuration

sudo mkdir /var/log/tanaguru /var/tmp/tanaguru /etc/tgol
sudo touch /var/log/tanaguru/tanaguru.log
sudo chown -R tomcat6 /etc/tgol /var/log/tanaguru/ /var/log/tanaguru/tanaguru.log /var/tmp/tanaguru
sudo chmod 755 /var/log/tanaguru/ /var/tmp/tanaguru

Copy all configuration files:

cd tanaguru-<version>.architecture>
sudo cp -r install-web-app/conf/* /etc/tgol/

Edit /etc/tgol/tgol.conf and adjust the following settings:

  • highlighterLocation
    the URL for the Source Code Highlighter, e.g. http://localhost/geshi/tgol_highlighter.php
  • tgol-deployment-path
    the path to the WEB-INF/conf/ directory of the webapp, e.g. /var/lib/tomcat6/webapps/tanaguru/WEB-INF/conf
  • web-app-url
    the fully qualified URL to join Tanaguru web interface, e.g. http://www.mydomain.com/tgol-web-app-1.4.2/
  • jdbc.url
    the complete URL to the database, e.g. jdbc:mysql://sql.mydomain.com:3306/myTanaguruDB
  • jdbc.username
    the database username
  • jdbc.password
    the database password

Set permissions and ownership:

sudo chown -R tomcat6 /etc/tgol/*
sudo chmod 600 /etc/tgol/*

Deploy the web application into the tomcat container

Copy file generated or downloaded war file to tomcat contrainer :

For Ubuntu 8.04 LTS distribution :

sudo ln -s /usr/share/java/mysql-connector-java.jar  /usr/share/tomcat6/lib/mysql-connector-java.jar

sudo cp tanaguru-<version>.<architecture>/install-web-app/lib/spring-tomcat-weaver-2.5.6.jar /usr/share/tomcat5.5/server/lib/

sudo cp tgol-web-app-<version>.war /var/lib/tomcat5.5/webapps/

sudo invoke-rc.d tomcat5.5 restart

For Ubuntu 10.04 LTS and Ubuntu 12.04 LTS distributions :

sudo ln -s /usr/share/java/mysql-connector-java.jar  /usr/share/tomcat6/lib/mysql-connector-java.jar

sudo cp tanaguru-<version>.<architecture>/install-web-app/lib/spring-instrument-tomcat-3.0.5.RELEASE.jar /usr/share/tomcat6/lib/

sudo cp tgol-web-app-<version>.war /var/lib/tomcat6/webapps/

sudo invoke-rc.d tomcat6 restart

JVM Set-up

The tomcat JVM that embeds tanaguru web-application needs to be set with memory options. To do so, edit the tomcat configuration file in the /etc/init.d/tomcat6 or /etc/init.d/tomcat5.5 depending on the version of Tomcat and add the "-Xms" And -Xmx" options to the JVM:

if [ -z "$JAVA_OPTS" ]; then
JAVA_OPTS="-Xms512M  -Xmx2048M"
fi

Tanaguru "Command Line Interface"

Tanaguru runs as a non-installed shell script, which allows you to run Tanaguru as a non-root user.

Configuration

Edit tanaguru.conf file and replace all stars '*********' with the correct user and password for your tanaguru mysql and replace the content of the jdbc.url variable with the right settings.

cd tanaguru-<version>.<architecture>
vi conf/context/tanaguru.conf

Running Tanaguru

Running Tanaguru web application

Tanaguru is now available at URL:

http://$SERVER_ADDRESS:$PORT/tanaguru-web-app-<version>/

where $SERVER_ADDRESS is the IP address or the hostname of the server hosting tanaguru and $PORT is the tomcat port (may be 8080 or 8180).

Launch Tanaguru with the command line interface

To launch tanaguru, execute the following commands :

cd tanaguru-<version>.<architecture>
./bin/tanaguru.sh <url-list>
where <url-list> is a blank-separated list of Urls to be tested.
By default the results are displayed on the standard output and can be accessible from the database
In addition, the following options may be useful:

-h : Show the help message.

-O : Path of the output result file (In this case, the results are not displayed on the standard output)

-l : Audit Level (Default Silver, can be set to Or(Gold Level), Ar(Silver Level) or Bz (Bronze Level)

To customize the rules set, use the -l option of the start script to choose the appropriate level and its associated rule set.