{"id":101,"date":"2009-03-12T14:10:49","date_gmt":"2009-03-12T21:10:49","guid":{"rendered":"http:\/\/www.zulutown.com\/blog\/?p=101"},"modified":"2009-03-12T14:10:49","modified_gmt":"2009-03-12T21:10:49","slug":"creating-tomcat6-windows-services","status":"publish","type":"post","link":"http:\/\/www.zulutown.com\/blog\/2009\/03\/12\/creating-tomcat6-windows-services\/","title":{"rendered":"Creating Tomcat6 Windows Services"},"content":{"rendered":"<p>Running the default Windows Tomcat installer a Tomcat server named <em>Tomcat6<\/em> will be created on the Windows machine.<\/p>\n<p>In the case the tomcat zipped installation file has been used, or if during the installation wizard the option for creating a Windows service hasn&#8217;t been checked, or finally, if it is required to have <em>multiple Tomcat services<\/em> running on the server, the Tomcat features to create new services should be used.<\/p>\n<p>Obviously it&#8217;s required to have Java installed, in this case, it&#8217;s used the JDK.<\/p>\n<p>The following batch script will install a tomcat service named <em>YourTomcat<\/em> related to a <code>CATALINA_BASE<\/code> located in <code>c:\\YourDir\\YourTomcat<\/code>.<\/p>\n<pre>set JAVA_HOME=\"c:\\Program Files\\Java\\jdk1.6.0_12\\\"\r\nset TOMCAT_HOME=\"c:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\"\r\nset CATALINA_BASE=\"c:\\YourDir\\YourTomcat\"\r\ncall service.bat install YourTomcat<\/pre>\n<p><code>JAVA_HOME<\/code> and  <code>TOMCAT_HOME<\/code> are obviously the places where Tomcat and Java are installed.<\/p>\n<p>What&#8217;s the <code>CATALINA_BASE<\/code>? In few words, from the same Tomcat installation (located in this example in <code>c:\\Program Files\\Apache Software Foundation\\Tomcat 6.0<\/code>, the <code>TOMCAT_HOME<\/code>) it&#8217;s possible to run more than one server instances. Each Tomcat instance has its own deployed web applications, its own logs, its own configuration and so on.<\/p>\n<p>The <code>CATALINA_BASE<\/code> needs to have those directories structure:<\/p>\n<pre>conf\/\r\nlogs\/\r\ntemp\/\r\nwebapps\/\r\nwork\/<\/pre>\n<p>In <code>conf\/<\/code> it&#8217;s possible to copy the content of the <code>conf\/<\/code> directory of the Tomcat installation, and obviously these files have to be customized, depending on what is required for that specific Tomcat service, i.e. the HTTP, AJP and SHUTDOWN ports, and so on.<\/p>\n<p>In <code>logs\/<\/code> each tomcat will write its custom <em>Catalina<\/em> logs or the web application specific logs (i.e. handled by Log4J).<\/p>\n<p>In <code>temp\/<\/code> Tomcat will obviously place temporary files.<\/p>\n<p>In <code>webapps\/<\/code> the web applications <code>.war<\/code> will be placed (and exploded).<\/p>\n<p>in <code>work\/<\/code> the compiled <code>.jsp<\/code> will be placed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running the default Windows Tomcat installer a Tomcat server named Tomcat6 will be created on the Windows machine. In the case the tomcat zipped installation file has been used, or if during the installation wizard the option for creating a &hellip; <a href=\"http:\/\/www.zulutown.com\/blog\/2009\/03\/12\/creating-tomcat6-windows-services\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[78,80,76,77,165,5,79,81,75,74],"_links":{"self":[{"href":"http:\/\/www.zulutown.com\/blog\/wp-json\/wp\/v2\/posts\/101"}],"collection":[{"href":"http:\/\/www.zulutown.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zulutown.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zulutown.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zulutown.com\/blog\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":1,"href":"http:\/\/www.zulutown.com\/blog\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":102,"href":"http:\/\/www.zulutown.com\/blog\/wp-json\/wp\/v2\/posts\/101\/revisions\/102"}],"wp:attachment":[{"href":"http:\/\/www.zulutown.com\/blog\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zulutown.com\/blog\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zulutown.com\/blog\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}