{"id":139,"date":"2010-06-22T16:17:21","date_gmt":"2010-06-22T20:17:21","guid":{"rendered":"http:\/\/www.xavignu.com\/?p=139"},"modified":"2010-07-22T21:00:18","modified_gmt":"2010-07-23T01:00:18","slug":"tomcat-isntallation-on-gnulinux","status":"publish","type":"post","link":"https:\/\/www.xavignu.com\/?p=139","title":{"rendered":"Tomcat installation on GNU\/Linux"},"content":{"rendered":"<p>Today I&#8217;m going to explain how to install Apache Tomcat on a Linux box. We should have a JDK already installed on the box. If that is not the case it can be downloaded from <a href=\"http:\/\/java.sun.com\" target=\"_blank\">Sun<\/a> website.<\/p>\n<p>Now we download Tomcat from the <a href=\"http:\/\/tomcat.apache.org\/download-60.cgi\" target=\"_blank\">website<\/a>. Once downloaded we will download and install it into the \/opt directory. We have to create the tomcat user.<\/p>\n<p><B>$ sudo useradd -g tomcat -d \/home\/tomcat tomcat<br \/>\n$ sudo passwd tomcat<\/B><\/p>\n<p>Now we have to define the $JAVA_HOME and $CATALINA_HOME variables. In \/home\/tomcat\/.bashrc add the following:<\/p>\n<p><B>export JAVA_HOME=\/opt\/java<br \/>\nexport CATALINA_HOME=\/opt\/tomcat<\/B><\/p>\n<p>Now change the ownership of \/opt\/tomcat directory, which is where we downloaded tomcat previously.<\/p>\n<p><B>$ sudo chown -R tomcat:tomcat \/opt\/tomcat<\/B><\/p>\n<p>We are now ready to start Tomcat. As tomcat user type:<\/p>\n<p><B>$ \/opt\/tomcat\/bin\/startup.sh<\/B><\/p>\n<p>If everything went well you shall now see tomcat process running.<\/p>\n<p><B>tomcat@debian: \/opt\/tomcat\/bin $ ps auxwww | grep -i java | grep -v grep<br \/>\ntomcat    6618  0.3  1.3 1064972 48260 pts\/0   Sl   15:51   0:03 \/opt\/java\/bin\/java -Djava.util.logging.config.file=\/opt\/tomcat\/conf\/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=\/opt\/tomcat\/endorsed -classpath \/opt\/tomcat\/bin\/bootstrap.jar -Dcatalina.base=\/opt\/tomcat -Dcatalina.home=\/opt\/tomcat -Djava.io.tmpdir=\/opt\/tomcat\/temp org.apache.catalina.startup.Bootstrap start<br \/>\ntomcat@debian: \/opt\/tomcat\/bin $ <\/B><\/p>\n<p>Now let&#8217;s see Tomcat on a browser. Hit http:\/\/localhost:8080\/ and you shall see a page as the one below.<\/p>\n<p><a href=\"http:\/\/www.xavignu.com\/wp-content\/uploads\/2010\/06\/tomcat1.png\"><img src=\"http:\/\/www.xavignu.com\/wp-content\/uploads\/2010\/06\/tomcat1.png\" alt=\"\" title=\"tomcat\" width=\"600\"  class=\"alignnone size-full wp-image-145\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I&#8217;m going to explain how to install Apache Tomcat on a Linux box. We should have a JDK already installed on the box. If that is not the case it can be downloaded from Sun website. Now we download Tomcat from the website. Once downloaded we will download and install it into the \/opt [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[3],"tags":[22,6,23,49,70],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/pTQgt-2f","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts\/139"}],"collection":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=139"}],"version-history":[{"count":0,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts\/139\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}