{"id":4908,"date":"2017-05-09T19:53:04","date_gmt":"2017-05-09T19:53:04","guid":{"rendered":"http:\/\/putridparrot.com\/blog\/?p=4908"},"modified":"2017-05-09T19:53:04","modified_gmt":"2017-05-09T19:53:04","slug":"turning-my-raspberry-pi-zero-w-into-a-tomcat-server","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/turning-my-raspberry-pi-zero-w-into-a-tomcat-server\/","title":{"rendered":"Turning my Raspberry Pi Zero W into a Tomcat server"},"content":{"rendered":"<p>I just got hold of a <a href=\"https:\/\/www.raspberrypi.org\/products\/pi-zero-w\/\" target=\"_blank\">Raspberry Pi Zero W<\/a> and decided it&#8217;d be cool\/fun to set it up as a Tomcat server.<\/p>\n<p><strong>Docker<\/strong><\/p>\n<p>I am (as some other posts might show) a bit of a fan of using Docker (although still a novice), so I went the same route with the Pi.<\/p>\n<p>As per the post <a href=\"https:\/\/www.raspberrypi.org\/blog\/docker-comes-to-raspberry-pi\/\" target=\"_blank\">Docker comes to Raspberry Pi<\/a>, run the following from you Pi&#8217;s shell<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\ncurl -sSL https:\/\/get.docker.com | sh\r\n<\/pre>\n<p>Next, add your username to the docker group (I&#8217;m using the standard <em>pi<\/em> user)<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nsudo usermod -aG docker pi\r\n<\/pre>\n<p><strong>Pull Tomcat for Docker<\/strong><\/p>\n<p>Don&#8217;t forget, the Raspberry Pi uses an ARM processor, so whilst Docker can help in deploying many things, the image still needs to have been built on the ARM processor. Hence just trying to pull Tomcat will fail with a message such as <\/p>\n<p><em>exec user process caused &#8220;exec format error&#8221;<\/em><\/p>\n<p>So to install Tomcat use the <a href=\"https:\/\/hub.docker.com\/r\/izone\/arm\/\" target=\"_blank\">izone image<\/a><\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\ndocker pull izone\/arm:tomcat\r\n<\/pre>\n<p><strong>Let&#8217;s run Tomcat<\/strong><\/p>\n<p>To run Tomcat (as per the <a href=\"https:\/\/hub.docker.com\/r\/izone\/arm\/\" target=\"_blank\">izone docker page<\/a>). Run<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\ndocker run --rm --name Tomcat -h tomcat \\\r\n-e PASS=&quot;admin&quot; \\\r\n-p 8080:8080 \\\r\n-ti izone\/arm:tomcat\r\n<\/pre>\n<p>You&#8217;ll may need to wait a while before the Tomcat server is up and running, but once it is simply use your browser to navigate to <\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nhttp:\/\/&lt;pi-zero-ip-address&gt;:8080\/\r\n<\/pre>\n<p>and you should see the Tomcat home page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just got hold of a Raspberry Pi Zero W and decided it&#8217;d be cool\/fun to set it up as a Tomcat server. Docker I am (as some other posts might show) a bit of a fan of using Docker (although still a novice), so I went the same route with the Pi. As per [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[102,161,59],"tags":[],"class_list":["post-4908","post","type-post","status-publish","format-standard","hentry","category-docker","category-java","category-raspberry-pi"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/4908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=4908"}],"version-history":[{"count":4,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/4908\/revisions"}],"predecessor-version":[{"id":4913,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/4908\/revisions\/4913"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=4908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=4908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=4908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}