Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Apache, Tomcat, 6, Running on CentOS 5 with mod_jk connector

Posted on 2008-10-27
6
Medium Priority
?
4,866 Views
Last Modified: 2013-12-16
Hello all,

   How is the configuration of Tomcat on Linux CentOS 5 different from windows config?  I got it to work on windows but I am having problems getting it to work on Linux for Tomcat 6.  

Thanks,
IT_Savant
0
Comment
Question by:IT_Savant
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 7

Assisted Solution

by:macker-
macker- earned 2000 total points
ID: 22837184
That's an extremely open-ended question.  Can you cite some specific issues you're having, symptoms, error messages, etc?
0
 

Author Comment

by:IT_Savant
ID: 22837489
For example, if I compiled and ran a J2EE program on Windows, would it be automagically guranteed to work on a Linux Box assuming tomcat was properly installed.  That is to say, would I have to muck with the libraries to get a J2EE software that worked on Windows localhost to work on a Linux box (a virtual server)?

Thanks,
IT_Savant
0
 
LVL 7

Assisted Solution

by:macker-
macker- earned 2000 total points
ID: 22843518
Java, as provided by Sun, is made to be a platform independent programming language.  That is to say, the idea is that a Java app could be run on Linux, Windows, MacOS, etc.

Microsoft's licensed implementation of Java does include some Windows-specific extensions, that preclude apps from being used on other platforms, if they use these extensions.

If you have libraries installed on the Windows side, that are not yet installed on the Linux side, it could fail.

Sun offers a high-level difference of the explanations at http://java.sun.com/javaee/overview/faq/j2ee.jsp#tomcat

A key excerpt is: "Sun adapts and integrates the then-current Tomcat source code into new releases of the J2EE SDK. However, since Tomcat evolves rapidly at Apache, there are additional differences between the JSP and Servlet implementations in the J2EE SDK and in Tomcat between J2EE SDK releases."

It sounds like your question is, should my app that's working fine in Windows, be expected to work just fine on the Tomcat server under Linux, and how much work would be involved in making it work.

Unfortunately, there's unlikely to be a simple answer to that, because it depends largely on your app, and how close the specific version of J2EE is to the version of Tomcat.
0
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 

Author Comment

by:IT_Savant
ID: 22844240
I used Java as provided by Sun, so all is well. Thank you Macker!  And it just so happened that I am using the current version of everything so there should be not much work to get everything to work.  I just needed to know if my there are any windows specific libraries that would have to be exchanged for a linux equivalent.

One more thing, I am having to type http://domain.com:8080/webapp  If you wouldn't mind, would you tell me what is necessary to make that http://domain.com/webapp? I have apache web server running on port 80 which is the default port. In fact, I wouldn't mind getting to a point where index.html is loading up my app on the default port.

Thanks,
IT_Savant
0
 
LVL 7

Assisted Solution

by:macker-
macker- earned 2000 total points
ID: 22846625
Unfortunately, I'm not familiar enough with the Windows implementation of J2EE to offer a useful answer on whether the libraries differ...

It sounds like your approach has been the same as mine would be; load up the app, see if it works, and research any errors.  Maybe someone else can offer some input on this.

With regards to the URL, you have two options here.  One is to have tomcat bind directly to port 80; this is possible, but is usually not recommended.  Tomcat does understand HTTP, but has very limited features, and is really useful in this manner only for basic testing, or if you're only exposing it to internal scripted applications and services.

The second option is to use mod_jk in apache; mod_jk is the Jakarta Connector, and allows Apache to field HTTP requests destined for Tomcat.  A basic mod_jk config, once mod_jk has been installed, might look something like this:

LoadModule jk_module modules/mod_jk.so
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel warn
JkWorkerProperty worker.local.port=8080
JkWorkerProperty worker.local.host=127.0.0.1
JkWorkerProperty worker.list=local

Then, if you have a VirtualHost directive, place the following within that section.  If not, then it can be in the main section. In either case, this should be near the relevant DocumentRoot statement:

JkMount /webapp/* local


It's also possible to do some auto-configuration with tomcat.  There's some great details on the mod_jk connector at the Tomcat site, though I'd look around the web for a primer specific to your distribution, e.g. "Red Hat tomcat mod_jk", as it'll offer more concise and useful suggestions.  (CentOS is effectively the same as Red Hat, but a different name; nearly all documentation applicable to Red Hat will apply to the same version of CentOS.)  The Tomcat document can be found at:

http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
0
 

Accepted Solution

by:
IT_Savant earned 0 total points
ID: 22919137
this was a solution to my question although it was difficult to understand right off the bat. -Thanks Macker!
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question