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.

#Tomcat self-starting
#Auteur : Cyril GRANDJEAN
#Description : Self-starting de tomcat
#name of the process : tomcat
#pid of  : /var/run/tomcat.pid
   /bin/echo -e "Error: $*"
   exit 1


case $1 in
    sh /share/Qweb/tomcat6/bin/startup.sh
    sh /share/Qweb/tomcat6/bin/shutdown.sh
    sh /share/Qweb/tomcat6/bin/shutdown.sh
    sh /share/Qweb/tomcat6/bin/startup.sh
    echo "Usage: $0 {start|stop|restart}"
    exit 1
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) :