{"id":1552,"date":"2011-04-24T03:32:56","date_gmt":"2011-04-24T09:32:56","guid":{"rendered":"http:\/\/humairahmed.com\/blog\/?p=1552"},"modified":"2011-04-24T03:48:49","modified_gmt":"2011-04-24T09:48:49","slug":"how-to-install-tomcat-6-on-ubuntu-server","status":"publish","type":"post","link":"https:\/\/humairahmed.com\/blog\/?p=1552","title":{"rendered":"How to install Tomcat 6 on Ubuntu Server"},"content":{"rendered":"<div class=\"twttr_buttons\"><div class=\"twttr_twitter\">\n\t\t\t\t\t<a href=\"http:\/\/twitter.com\/share?text=How+to+install+Tomcat+6+on+Ubuntu+Server\" class=\"twitter-share-button\" data-via=\"\" data-hashtags=\"\"  data-size=\"default\" data-url=\"https:\/\/humairahmed.com\/blog\/?p=1552\"  data-related=\"\" target=\"_blank\">Tweet<\/a>\n\t\t\t\t<\/div><\/div><p>Before installing Tomcat, make sure you have the Java Runtime Environment installed. You can check this with the following command:<\/p>\n<blockquote><p>dpkg &#8211;get-selections | grep sun-java<\/p><\/blockquote>\n<p><!--more--><br \/>If it is not installed, you can see a prior post of mine on how to install it <a href=\"http:\/\/humairahmed.com\/blog\/?p=1171\">here<\/a>.<br \/>\n<br \/>Now that we got that out of the way, enter the following command:<\/p>\n<blockquote><p>apt-cache search tomcat<\/p><\/blockquote>\n<p>Using &#8220;apt get install <em>package_name<\/em>&#8220;, you can go ahead and install everything that has &#8220;tomcat6&#8221; as part of the package name. At this point, &#8220;libservlet2.5-java&#8221; or a later version should already be installed on your computer; if not, go ahead and install it. The documentation &#8220;libservlet2.5-java-doc&#8221; probably is not installed so you may want to install it as well. That&#8217;s all there is to it. You can also install the packages manually, but I feel this is a much easier way to go about it. You can now start, stop, and restart the Tomcat server using the following commands:<\/p>\n<blockquote><p>\n\/etc\/init.d\/tomcat6 start<br \/>\n\/etc\/init.d\/tomcat6 stop<br \/>\n\/etc\/init.d\/tomcat6 restart\n<\/p><\/blockquote>\n<p>Test the application server by using your browser to navigate to &#8220;http:\/\/localhost:8080&#8221;; you should see a default page that gets served-up by the application server. You should also test that the application server and Java Runtime are correctly setup and working well together by creating a simple JSP page and putting it in the &#8220;\/var\/lib\/tomcat6\/webapps\/ROOT&#8221; directory. Using your browser, navigate to &#8220;http:\/\/localhost:8080\/<em>your_JSP_page.jsp<\/em>&#8221; and you should see the respective output.<br \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before installing Tomcat, make sure you have the Java Runtime Environment installed. You can check this with the following command: dpkg &#8211;get-selections | grep sun-java<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[365,251,3,366,257],"tags":[367,368,4343,4358,53,369],"class_list":["post-1552","post","type-post","status-publish","format-standard","hentry","category-application-servers","category-linux-operating-systems-technology","category-technology","category-tomcat","category-ubuntu-linux-operating-systems-technology-operating-systems-technology","tag-apache","tag-apache-tomcat","tag-java","tag-tomcat","tag-ubuntu","tag-ubuntu-server"],"_links":{"self":[{"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1552"}],"version-history":[{"count":35,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1552\/revisions"}],"predecessor-version":[{"id":1587,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1552\/revisions\/1587"}],"wp:attachment":[{"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/humairahmed.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}