Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2490
  • Last Modified:

Setting up Tomcat

Can any one assist with (step by step) setting up Tomcat5.5 on Suse Linux 64bit.
0
zellars
Asked:
zellars
  • 3
  • 3
  • 3
  • +1
1 Solution
 
silemoneCommented:
I suggest you get an installer to do it for you...Setting up tomcat can be tedious...
0
 
silemoneCommented:
It will seem simple until you try to run some java site and you get an error...tomcat installers are much more simpler...
0
 
objectsCommented:
have a read of the following
http://www.aquezada.com/staff/julian/journal/?p=152

let me know if you get stuck and I'll see if I can help

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
zellarsAuthor Commented:
My issue is that I can get Tomcat running but exactly how do I deploy a webapp on a url to the world? I can connect to tomcat on localhost:8080 and to apache on ipaddress:80 but not to tomcat on ipaddress:8080 from other hosts. I keep playing with the config and breaking tomcat. I'm using SUSE 11 64bit and TOMCAT6 (Sorry not 5.5). I would like to deploy webapp on port 80 to internet using apache and tomcat6.
0
 
objectsCommented:
if apache is running on port 80, you 'll need to set it up to redirect to tomcat
(or get rid of apache on that port)

0
 
silemoneCommented:
use xampp for linux to take of all this for you or lamp...these are installer's that sets all this up for you...my last shot at making you life easier...

cheers.
0
 
kipper3dCommented:
Setting up tomcat is as easy as untaring the file and running it as long as you have the jvm in the class path and then point your browser to server hostname:8080.

But if you want tomcat to work over port 80 through apache, you will need to compile mod_jk (tomcat connector) and configure which is a bit involved.
Youll need
1. compile mod_jk for your apache version
2. setup mod_jk.conf in your /etc/httpd/conf.d/ (includes mod_jk config you need to add to httpd.conf)
3. setup up workers.properties in /etc/httpd/conf/
4. add jkmounts to your domains httpd.conf properties.
0
 
zellarsAuthor Commented:
OK, I think I will just NAT from port 80 to Tomcat port 8080.
0
 
kipper3dCommented:
Hello Zellers,

I provided you with step by step so that tomcat will work on port 80.

The key to making that happen is mod_jk and the /etc/httpd/conf/workers.properties.
Please list what you've done and I can guide you with more specifics.

Did you compile mod_jk?
Did you add the mod_jk.conf details in /etc/httpd/conf.d/
Did you create the worker for ajp13 in workers? Default workers.properties that comes with mod_jk should suffice.

Did you add the jkmounts? I can post here exactly what you need in the mod_jk.conf and the httpd conf for your virtual domain here this afternoon. Please provide the root path locations to your tomcat.

0
 
kipper3dCommented:
Ah, turns out I have a minute. Ill lay it all out.

1. Download tomcat's mod_jk coyote connector: JK 1.2.27 Source Release tar.gz to /root/
http://tomcat.apache.org/download-connectors.cgi 

2. Compile mod_jk:
untar and then
$> cd native
$> ./configure --with-apxs=/usr/sbin/apxs (or where ever the apxs/apxs2 is)
$> make
$> su -c 'make install'

3. Setup mod_jk.conf in /etc/httpd/conf.d/ (apache's include dir)
touch /etc/httpd/conf.d/mod_jk.conf

paste the following in the file:
    DirectoryIndex index.jsp index.do
    # Load mod_jk module  ### use correct path to your mod_jk.so ####
    LoadModule    jk_module  /usr/lib/httpd/modules/mod_jk.so
    # Declare the module for <IfModule directive>
    # AddModule     mod_jk.c
    # Where to find workers.properties
    JkWorkersFile /etc/httpd/conf/workers.properties
    # Where to put jk logs
    JkLogFile     /var/log/httpd/mod_jk.log
    # Set the jk log level [debug/error/info]
    JkLogLevel    info
    # Select the log format
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " 
    # JkOptions indicate to send SSL KEY SIZE,
    # JkOptions     +ForwardKeySize +ForwardURICompat -ForwardDirectories
    # JkRequestLogFormat set the request format
    JkRequestLogFormat     "%w %V %T"

# SSL Directives
    # Should mod_jk send SSL information to Tomcat (default is On)
    JkExtractSSL On
    # What is the indicator for SSL (default is HTTPS)
    JkHTTPSIndicator HTTPS
    # What is the indicator for SSL session (default is SSL_SESSION_ID)
    JkSESSIONIndicator SSL_SESSION_ID
    # What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
    JkCIPHERIndicator SSL_CIPHER
    # What is the indicator for the client SSL certificated (default is SSL_CLIENT_CERT)
    JkCERTSIndicator SSL_CLIENT_CERT

4. Go back to the mod_jk files you untarred in /root/ and find the copy of the workers.properties file. cp this file to /etc/httpd/conf/

5. Add httpd conf data to your virtual host entry
<Location /WEB-INF/ > 
    AllowOverride None
    deny from all
 </Location>
 <Location /META-INF/ > 
    AllowOverride None
    deny from all
 </Location>

       JkAutoAlias /home/user/path to tomcat webapps/
       JkMount /*.jsp ajp13
       JkMount /servlet/* ajp13
       JkMount /*.xml  ajp13
       AddType text/xml .xml

Restart tomcat and then httpd.
You may need to make some changes to your server.xml
But this is how I set up tomcats for virtual hosting over port 80 and I've hosted hundreds of tomcat sites this way, so I know this works.

0
 
zellarsAuthor Commented:
Thank you sir for your expertise. I will keeping working towards attaining your skill level!
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now