Knowledgebase

Portal Home > Knowledgebase > Articles Database > Help me installing Java/Tomcat


Help me installing Java/Tomcat




Posted by servlet, 06-02-2009, 09:33 AM
Rightnow OpneJDK 6 is already installed, I want to remove it and install Sun JDK6 and tomcat. There are many threads on the web discussing this topic, but every one says some thing different, so its getting confusing. Any one, who is running java hosting, please come ahead and help me. System info: CentOS 5.3 Thanks Last edited by servlet; 06-02-2009 at 09:40 AM.

Posted by eth1, 06-02-2009, 12:51 PM
You will find many a guides/tutorials for achieving this task, For installing Sun JDK, For installing Tomcat in Linux, In case if you face problems you can always post the error and explain the issue.

Posted by barry[CoffeeSprout], 06-02-2009, 05:44 PM
yum remove java. Download the Java rpm.bin from http://java.sun.com Be sure to download the Java SDK (JDK) as jsp support can require it. As for installing Tomcat, the guide posted by eth1 is pretty much alright. You probably want to put a reverse proxy (nginx, apache) in front of Tomcat so that it can be reached on port 80 Do yourself a favor and avoid AJP

Posted by servlet, 06-03-2009, 01:49 AM
Thanks eth1 Can not I follow the steps mentioned here http://java.sun.com/javase/6/webnote...all-linux.html It's provided by sun.. I read somewhere that these steps are not proper.. can you tell me.. whats the problem with this. Last edited by servlet; 06-03-2009 at 01:58 AM.

Posted by eth1, 06-03-2009, 04:44 AM
Glad to help. The instructions are correct for installation of Sun JDK via RPM or using the Self-Extracting Binary.

Posted by servlet, 06-03-2009, 05:58 AM
Okay.. I managed to install Sun JDK 6 Now, I am planning to install Jetty (Later may switch to tomcat) web server, Apache is already installed. I will need to configure so that Apache will delegate particular requests to jetty. http://jetty.mortbay.org/jetty5/faq/..._t_apache.html What is the better alternative, AJP13 and mod_jk or mod_proxy Any one got any experience with Mod_jk? Last edited by servlet; 06-03-2009 at 06:02 AM.

Posted by barry[CoffeeSprout], 06-03-2009, 05:59 AM
Just follow the steps, I've automated the process myself and it's pretty easy

Posted by barry[CoffeeSprout], 06-03-2009, 06:04 AM
Hi, Certainly. My experience is that both will work, but AJP can lose it's "connection" with Tomcat. Using proxy based is simpler (just basic HTTP) and you're not stuck using a front end server that supports AJP. My 2c.

Posted by tuxguru, 06-03-2009, 06:09 AM
Yes, better follow the "Installation of RPM File" method. After this if you have multiple versions of java installed, you may have to configure system using 'alternatives' to use the SUN java. To see the available alternatives:To install sun java installed using RPM method:To set the default alternative to SUN java:and select /usr/java/latest/bin/java (enter 2 in the above example)

Posted by servlet, 06-03-2009, 06:22 AM
Thanks tuxguru... I don't have another version of Java installed.. I just removed open JDK, So don't need alternatives.

Posted by servlet, 06-03-2009, 06:23 AM
Can you post the steps or link to the resources.. To configure Apache/Tomcat or Jetty using mode_proxy Thanks

Posted by servlet, 06-03-2009, 06:46 AM
It may be totally foolish question... I have got two IP addresses, can I run both tomcat and Apache on same port 80 but on different IP

Posted by tuxguru, 06-03-2009, 07:21 AM
Yes. Use 'address' attribute of 'Connector' in server.xml to specify the IP where tomcat should listen (also set port attribute to 80) and 'Listen' directive in httpd.conf to specify the IP where apache should listen.

Posted by servlet, 06-03-2009, 07:31 AM
That mean, I would be able to run both the servers on port 80 Each with its own IP.

Posted by tuxguru, 06-03-2009, 08:01 AM
Right. You can do that.

Posted by servlet, 06-03-2009, 09:53 AM
Ok.. Finally I got tomcat running on different IP.. Still need to figureout how to integrate with Apache using mod_proxy or mod_jk, incase I need it in future.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
UK Hosting for US?? (Views: 572)


Language:

Contact us