{"id":313,"date":"2011-07-08T17:47:30","date_gmt":"2011-07-08T16:47:30","guid":{"rendered":"http:\/\/blog.cyril-grandjean.fr\/?p=313"},"modified":"2018-03-22T18:46:29","modified_gmt":"2018-03-22T17:46:29","slug":"installation-dapache-tomcat-sur-un-qnap","status":"publish","type":"post","link":"https:\/\/www.cyril-grandjean.fr\/en\/installation-apache-tomcat-qnap","title":{"rendered":"Installation of Apache Tomcat on a QNAP"},"content":{"rendered":"<p><\/p>\n<p>Here is a small tutorial for all who want to install Apache Tomcat on a QNAP.<\/p>\n<p>First of all, download Java and Apache Tomcat and upload on your NAS.<\/p>\n<p>Below are the paths to install Java and Apache Tomcat that I used : <\/p>\n<ul>\n<li>Java : \/share\/Qweb\/java6<\/li>\n<li>Tomcat : \/share\/Qweb\/tomcat6<\/li>\n<\/ul>\n<p>Then, I have created the file tomcat.sh on the root of tomcat6.<\/p>\n<pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">#!\/bin\/sh\r\n#Tomcat self-starting\r\n#Auteur : Cyril GRANDJEAN\r\n#Description : Self-starting de tomcat\r\n#name of the process : tomcat\r\n#pid of  : \/var\/run\/tomcat.pid\r\nRETVAL=0\r\nQPKG_NAME=&quot;tomcat6&quot;\r\n_exit()\r\n{\r\n   \/bin\/echo -e &quot;Error: $*&quot;\r\n   \/bin\/echo\r\n   exit 1\r\n}\r\n\r\nJRE_HOME=&quot;\/share\/Qweb\/java6&quot;\r\nCATALINA_HOME=&quot;\/share\/Qweb\/tomcat6&quot;\r\n\r\ncase $1 in\r\n  start)\r\n    sh \/share\/Qweb\/tomcat6\/bin\/startup.sh\r\n    ;;\r\n  stop)\r\n    sh \/share\/Qweb\/tomcat6\/bin\/shutdown.sh\r\n    ;;\r\n  restart)\r\n    sh \/share\/Qweb\/tomcat6\/bin\/shutdown.sh\r\n    sh \/share\/Qweb\/tomcat6\/bin\/startup.sh\r\n    ;;\r\n  *)\r\n    echo &quot;Usage: $0 {start|stop|restart}&quot;\r\n    exit 1\r\nesac\r\nexit $RETVAL\r\n<\/pre>\n<p>Then, to use it as a package on the interface of the QNAP, I have used the following commands :<\/p>\n<pre><pre class=\"brush: bash; title: ; notranslate\" title=\"\">echo &quot;&#x5B;tomcat6]&quot; &gt;&gt; \/etc\/config\/qpkg.conf\r\necho &quot;Name = Tomcat6&quot; &gt;&gt; \/etc\/config\/qpkg.conf\r\necho &quot;Version = 6.0&quot; &gt;&gt; \/etc\/config\/qpkg.conf\r\necho &quot;Enable = TRUE&quot; &gt;&gt; \/etc\/config\/qpkg.conf\r\necho &quot;Shell = \/share\/Qweb\/tomcat6\/tomcat.sh&quot; &gt;&gt; \/etc\/config\/qpkg.conf<\/pre>\n<p>You can now use Apache Tomcat on your QNAP.<\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,4,107],"tags":[61,54,35,60,58],"class_list":["post-313","post","type-post","status-publish","format-standard","hentry","category-autres","category-projets","category-tous","tag-apache","tag-java","tag-nas","tag-qnap","tag-tomcat"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.cyril-grandjean.fr\/en\/wp-json\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cyril-grandjean.fr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cyril-grandjean.fr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cyril-grandjean.fr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cyril-grandjean.fr\/en\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":0,"href":"https:\/\/www.cyril-grandjean.fr\/en\/wp-json\/wp\/v2\/posts\/313\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cyril-grandjean.fr\/en\/wp-json\/wp\/v2\/media?parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cyril-grandjean.fr\/en\/wp-json\/wp\/v2\/categories?post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cyril-grandjean.fr\/en\/wp-json\/wp\/v2\/tags?post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}