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).
Please ensure you meet all prerequisites for Tanaguru on Ubuntu.
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.
tar xzf tanaguru-<version>.<architecture>.tar.gz
tar xzf tanaguru-rules-<version>.<architecture>.tar.gz
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)
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
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 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.
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:
highlighterLocationhttp://localhost/geshi/tgol_highlighter.phptgol-deployment-pathWEB-INF/conf/ directory of the webapp, e.g. /var/lib/tomcat6/webapps/tanaguru/WEB-INF/confweb-app-urlhttp://www.mydomain.com/tgol-web-app-1.4.2/jdbc.urljdbc:mysql://sql.mydomain.com:3306/myTanaguruDBjdbc.usernamejdbc.passwordSet permissions and ownership:
sudo chown -R tomcat6 /etc/tgol/*
sudo chmod 600 /etc/tgol/*
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
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 runs as a non-installed shell script, which allows you to run Tanaguru as a non-root user.
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
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).
To launch tanaguru, execute the following commands :
cd tanaguru-<version>.<architecture>
./bin/tanaguru.sh <url-list>
<url-list> is a blank-separated list of Urls to be tested.-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.