08/07/2011 Written by Cyril GRANDJEAN

Here is a small tutorial for all who want to install Apache Tomcat on a QNAP.

First of all, download Java and Apache Tomcat and upload on your NAS.

Below are the paths to install Java and Apache Tomcat that I used :

  • Java : /share/Qweb/java6
  • Tomcat : /share/Qweb/tomcat6

Then, I have created the file tomcat.sh on the root of tomcat6.

#!/bin/sh
#Tomcat self-starting
#Auteur : Cyril GRANDJEAN
#Description : Self-starting de tomcat
#name of the process : tomcat
#pid of  : /var/run/tomcat.pid
RETVAL=0
QPKG_NAME="tomcat6"
_exit()
{
   /bin/echo -e "Error: $*"
   /bin/echo
   exit 1
}

JRE_HOME="/share/Qweb/java6"
CATALINA_HOME="/share/Qweb/tomcat6"

case $1 in
  start)
    sh /share/Qweb/tomcat6/bin/startup.sh
    ;;
  stop)
    sh /share/Qweb/tomcat6/bin/shutdown.sh
    ;;
  restart)
    sh /share/Qweb/tomcat6/bin/shutdown.sh
    sh /share/Qweb/tomcat6/bin/startup.sh
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac
exit $RETVAL

Then, to use it as a package on the interface of the QNAP, I have used the following commands :

echo "[tomcat6]" >> /etc/config/qpkg.conf
echo "Name = Tomcat6" >> /etc/config/qpkg.conf
echo "Version = 6.0" >> /etc/config/qpkg.conf
echo "Enable = TRUE" >> /etc/config/qpkg.conf
echo "Shell = /share/Qweb/tomcat6/tomcat.sh" >> /etc/config/qpkg.conf

You can now use Apache Tomcat on your QNAP.

23/03/2011 Written by Cyril GRANDJEAN

During my internship at Distrame from July 2010 to September 2011, I have participated to the creation of the solution Efficacenergie. This solution, directly installed on the intranet network of the customer, allows the measure of energy consumption of a building such as water consumption, gas, electricity or the measure of temperature, … Efficacenergie is compatible with the wireless sensors of the brands LEM and Coronis.

The solution is installed on a NAS working on a linux operating system. Our NAS server is going to play collector’s role of data resulting from wireless sensors. Thanks to the application server Apache Tomcat and a mySQL database, the customer can visualize his consumptions with an ergonomic Web interface developed from the javascript framework Ext-JS. You can find on my portfolio a list of available features with Efficacenergie.

Here is a small video of presentation of the solution (French video) :

13/09/2009 Written by Cyril GRANDJEAN

Synology DS 109

Here is my last acquisition for my home server.

This NAS is not a simple storage system. This is a complete server, customisable, energy-efficient who allows natively to reach very easily its files in FTP and HTTP in local area network or on internet. He can also host websites, share files, photos and videos with a beautiful AJAX interface. To see the features integrated natively, click here.

To be able to add other features, the forum www.nas-forum.com can help you.