{"id":1016,"date":"2009-12-12T22:01:02","date_gmt":"2009-12-13T03:01:02","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/?p=1016"},"modified":"2009-12-12T22:01:02","modified_gmt":"2009-12-13T03:01:02","slug":"install-javatomcat","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/install-javatomcat\/","title":{"rendered":"Install Java\/Tomcat"},"content":{"rendered":"<p>How to Install Java and Apache Tomcat on a Centos 5 server;<\/p>\n<p>Question:<\/p>\n<p>How do I install Tomcat on Centos?<\/p>\n<p>Answer:<\/p>\n<p>In order to install Tomcat on Centos you first need to install Java. Both free and non-free packages are required for the installation. The non-free packages do not cost money however you must download them directly from Sun and agree to the license terms.<\/p>\n<p>1) Install Build Packages<br \/>\n<\/p>\n<pre style=\"border: 1px inset; margin: 0px; padding: 0px; overflow: auto; width:100%; height:25%; text-align: left;\" dir=\"ltr\">\nyum install rpm-build gcc-java jpackage-utils libXp\n<\/pre>\n<p><\/p>\n<p>2) Download Java files:<\/p>\n<p>Make a Directory to store the Java files:<br \/>\n<\/p>\n<pre style=\"border: 1px inset; margin: 0px; padding: 0px; overflow: auto; width:100%; height:25%; text-align: left;\" dir=\"ltr\">\nmkdir \/opt\/Java\n<\/pre>\n<p><\/p>\n<p>3) Download needed files to Java directory we created:<br \/>\n<\/p>\n<pre style=\"border: 1px inset; margin: 0px; padding: 0px; overflow: auto; width:100%; height:25%; text-align: left;\" dir=\"ltr\">\nwget http:\/\/mirrors.sunsite.dk\/jpackage\/1.6\/generic\/non-free\/SRPMS\/jta-1.0.1-0.b.4jpp.nosrc.rpm\nwget http:\/\/mirrors.sunsite.dk\/jpackage\/5.0\/generic\/non-free\/SRPMS\/java-1.5.0-sun-1.5.0.15-1jpp.nosrc.rpm\n<\/pre>\n<p><\/p>\n<p>4) Download 2 files needed from Sun:<\/p>\n<p>Go to<a href=\" http:\/\/java.sun.com\/products\/archive\/ \"> http:\/\/java.sun.com\/products\/archive\/ <\/a>and half way down the page you will see JDK\/JRE \u2013 5.0 to the right of it in the drop down text box. Select \u201c5.0 Update 15? and hit GO.<br \/>\nSelect \u201cDownload JDK\u201d and on the next page<br \/>\nSelect platform: linux and then<br \/>\nDownload the file jdk-1_5_0_15-linux-i586.bin to Directory \/opt\/Java<\/p>\n<p>Then go to <a href=\"http:\/\/java.sun.com\/products\/jta\/\">http:\/\/java.sun.com\/products\/jta\/<\/a> and Select \u201cClass Files 1.0.1B\u201d and download the file to the directory \/opt\/Java   <\/p>\n<p>To install or build RPM Java files:<\/p>\n<p>Copy files downloaded from Sun site to \/usr\/src\/redhat\/SOURCES :<br \/>\n<\/p>\n<pre style=\"border: 1px inset; margin: 0px; padding: 0px; overflow: auto; width:100%; height:25%; text-align: left;\" dir=\"ltr\">\ncp \/opt\/Java\/jta-1_0_1B-classes.zip \/usr\/src\/redhat\/SOURCES\/\ncp \/opt\/Java\/jdk-1_5_0_15-linux-i586.bin \/usr\/src\/redhat\/SOURCES\/\n<\/pre>\n<p><\/p>\n<p>Build the RPM files and install:<\/p>\n<p>rebuild \u2014 installs the named source package, and does a prep, compile and install. In addition, \u2013rebuild builds new binary package<br \/>\n<\/p>\n<pre style=\"border: 1px inset; margin: 0px; padding: 0px; overflow: auto; width:100%; height:25%; text-align: left;\" dir=\"ltr\">\nrpmbuild --rebuild \/opt\/Java\/java-1.5.0-sun-1.5.0.15-1jpp.nosrc.rpm\nrpm -Uvh \/usr\/src\/redhat\/RPMS\/i586\/java-1.5.0-sun-1.5.0.15-1jpp.i586.rpm\nrpm -Uvh \/usr\/src\/redhat\/RPMS\/i586\/java-1.5.0-sun-devel-1.5.0.15-1jpp.i586.rpm\n<\/pre>\n<p><\/p>\n<p>rpmbuild &#8211;rebuild &#8211;without javadoc \/opt\/Java\/jta-1.0.1-0.b.4jpp.nosrc.rpm<br \/>\n<\/p>\n<pre style=\"border: 1px inset; margin: 0px; padding: 0px; overflow: auto; width:100%; height:25%; text-align: left;\" dir=\"ltr\">\nrpm -Uvh \/usr\/src\/redhat\/RPMS\/noarch\/jta-1.0.1-0.b.4jpp.noarch.rpm\n<\/pre>\n<p>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nTo install or update the Java VM RTE<\/p>\n<p>Download the RPM file from:<br \/>\n32-bit Java: http:\/\/layer3.liquidweb.com\/java\/jre-6u2-linux-i586-rpm.bin<br \/>\n64-bit Java: http:\/\/layer3.liquidweb.com\/java\/jre-6u2-linux-amd64-rpm.bin<br \/>\nMake sure that you have the appropriate platform (ie x64_86 or x86)<br \/>\nNote: Please use the 32-bit version for Java applet and Java Web Start support.<br \/>\n1. Run the bin file and follow the on screen instructions (Press Q to exit the license)<br \/>\nAfter this is installed we need to update the symlink \/usr\/bin\/java<br \/>\ncd \/usr\/bin\/<br \/>\nrm -f .\/java<br \/>\nln -s \/usr\/java\/jre1.6.0_02\/bin\/java java<br \/>\nTo verify that this is installed run:<br \/>\njava -version<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>5) Install Apache Tomcat:<\/p>\n<p>Install Apache Tomcat using yum:<br \/>\n<\/p>\n<pre style=\"border: 1px inset; margin: 0px; padding: 0px; overflow: auto; width:100%; height:25%; text-align: left;\" dir=\"ltr\">\nyum install tomcat5 tomcat5-webapps tomcat5-admin-webapps\n<\/pre>\n<p><\/p>\n<p>If you get an error:<\/p>\n<p>***Error Missing Dependency: \/usr\/bin\/rebuild-security-providers is needed by package java-1.4.2-gcj-compat***<br \/>\na. Remove jpackage-utils: rpm -e jpackage-utils \u2013nodeps<br \/>\nb. Disable the JPackage repo<br \/>\nc. Install from standard repos:<br \/>\n<\/p>\n<pre style=\"border: 1px inset; margin: 0px; padding: 0px; overflow: auto; width:100%; height:25%; text-align: left;\" dir=\"ltr\">\nyum install jpackage-utils\n<\/pre>\n<p><\/p>\n<p>Start Tomcat and Set to Start on Boot<\/p>\n<p>Start Tomcat:<br \/>\n<\/p>\n<pre style=\"border: 1px inset; margin: 0px; padding: 0px; overflow: auto; width:100%; height:25%; text-align: left;\" dir=\"ltr\">\nservice tomcat5 restart\n<\/pre>\n<p><\/p>\n<p>Set to Start on Boot:<br \/>\n<\/p>\n<pre style=\"border: 1px inset; margin: 0px; padding: 0px; overflow: auto; width:100%; height:25%; text-align: left;\" dir=\"ltr\">\nchkconfig tomcat5 on\n<\/pre>\n<p><\/p>\n<p>***if you get the error;<br \/>\nStarting tomcat5: \/usr\/bin\/rebuild-jar-repository: error: Could not find xml-commons-apis Java extension for this JVM \/usr\/bin\/rebuild-jar-repository: error: Some detected jars were not found for this jvm***<\/p>\n<p>Run<br \/>\n<\/p>\n<pre style=\"border: 1px inset; margin: 0px; padding: 0px; overflow: auto; width:100%; height:25%; text-align: left;\" dir=\"ltr\">\nyum install xml-commons-apis\n<\/pre>\n<p><\/p>\n<p>this will install the missing extension.<\/p>\n<p>Just a note regarding java;<br \/>\nJava usage will create an increased load on the server with a busy site, so expect to see this. (Java itself leaves a large memory footprint.)<br \/>\nThis can usually be alleviated by incrementally increasing the RAM on the server as you see the load grow.  Also make sure to have the hosting company optimize Apache for you to compensate for the increased load as well. (Apache optimization will aid only to a certain point, so do not expect to see large load drops, but very moderate changes. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Install Java and Apache Tomcat on a Centos 5 server; Question: How do I install Tomcat on Centos? Answer: In order to install Tomcat on Centos you first need to install Java. Both free and non-free packages are required for the installation. The non-free packages do not cost money however you must download&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/install-javatomcat\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1016","post","type-post","status-publish","format-standard","hentry","category-info"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Install Java\/Tomcat - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/install-javatomcat\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install Java\/Tomcat - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"How to Install Java and Apache Tomcat on a Centos 5 server; Question: How do I install Tomcat on Centos? Answer: In order to install Tomcat on Centos you first need to install Java. Both free and non-free packages are required for the installation. The non-free packages do not cost money however you must download... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/install-javatomcat\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2009-12-13T03:01:02+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-javatomcat\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-javatomcat\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Install Java\\\/Tomcat\",\"datePublished\":\"2009-12-13T03:01:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-javatomcat\\\/\"},\"wordCount\":537,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"General Info\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-javatomcat\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-javatomcat\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-javatomcat\\\/\",\"name\":\"Install Java\\\/Tomcat - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2009-12-13T03:01:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-javatomcat\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-javatomcat\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-javatomcat\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install Java\\\/Tomcat\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install Java\/Tomcat - Linux Shtuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/g33kinfo.com\/info\/install-javatomcat\/","og_locale":"en_US","og_type":"article","og_title":"Install Java\/Tomcat - Linux Shtuff","og_description":"How to Install Java and Apache Tomcat on a Centos 5 server; Question: How do I install Tomcat on Centos? Answer: In order to install Tomcat on Centos you first need to install Java. Both free and non-free packages are required for the installation. The non-free packages do not cost money however you must download... Read More","og_url":"https:\/\/g33kinfo.com\/info\/install-javatomcat\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2009-12-13T03:01:02+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/install-javatomcat\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/install-javatomcat\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Install Java\/Tomcat","datePublished":"2009-12-13T03:01:02+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/install-javatomcat\/"},"wordCount":537,"commentCount":0,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["General Info"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/g33kinfo.com\/info\/install-javatomcat\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/install-javatomcat\/","url":"https:\/\/g33kinfo.com\/info\/install-javatomcat\/","name":"Install Java\/Tomcat - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2009-12-13T03:01:02+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/install-javatomcat\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/install-javatomcat\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/install-javatomcat\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Install Java\/Tomcat"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/1016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=1016"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/1016\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=1016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=1016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=1016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}