Kattare Internet Hosting Home | Home | Services | Contact Us | Order Online |   whitespace image
  Kattare I/S: View FAQ Answer | Webmail | News | FAQ | Members Login |   whitespace image
tail end of the Kattare logo Toll Free: (866) KATTARE -or- (877) KATTARE
Local: (541) 753-1079
keyboard image  whitespace image
You've got Q's? We've got A's.  whitespace image
greenspace image for php hosting, jsp hosting, servlet hosting, java hosting website

Home

Contribute Hosting!

Hosting Services

Java Hosting
  JBoss Hosting
  JSP Hosting
  GlassFish Hosting
  Servlet Hosting
  Tcat Hosting
  Tomcat Hosting

Standard Hosting
  Perl Hosting
  PHP 4 Hosting
  PHP 5 Hosting
  Ruby Hosting

Dedicated Servers
Server Co-Location

Domain Lookup
Join Us Today!

Members

Control Panel
  Ticketing
  Webmail
F.A.Q.
Recent News
Referral System
Spam Blocking

Company

About Us
  History
  Privacy Policy
  Sites We Host
  Strategic Partners
  Terms of Service
  Trademarks
Contact Us
  Phone / Fax
  Mail / Email
  SMS Text


Verify Kattare Internet Services

Documentation

Kattare is dedicated to making your hosting experience as painless as possible. That means making as much help and documentation available as possible. If you have a question that you think would be helpful to have here, please [Submit your Question].

Quick Links
 [Getting Started
 [JSP & Java
 [Ruby & Rails
 [Email & Webmail
Category
JSP-Java Servlets
Question

Last Modified: Nov 20, 2008

How do I install my own Tomcat instance?
Answer

First of all I would like to point out the advantages of having a Kattare 
installed Tomcat instance.

1.	Minor version updates.
 
       As new bug and security fixes are released for Tomcat we update the 
       core files in /usr/local.   A Tomcat restart after the upgrade is all 
       that is required.  This alleviates you from having to go through the 
       setup process I will go through later on in this entry to modify files 
       for any minor version update, saving you some time.

2.	Disk Quota

	A significant portion of the Tomcat core files are store in /usr/local 
        as already mentioned.  Since the files are not in your account they will
        not count against your disk quota.


  We have multiple versions of Tomcat available for install so a quick check 
  with Kattare support should be considered as it could save you time.

  One important thing to understand is that Tomcat is setup to run on port 8080
  out of the box.  Since we have multiple users on the same server we have 
  assigned each account it’s own port range to run Tomcat on.  The following 
  instructions are on how to modify a new Tomcat instance to run on these ports.
  It will also include instructions on how to increase the default heap size.

Download Tomcat from http://tomcat.apache.org/ into your account.  This can be done 
with wget.

wget http://tomcat.apache.org/apache-tomcat-6.0.18.tar.gz    (example URL)

Extract the .tar.gz file with the following command.

tar -zxf apache-tomcat-6.0.18.tar.gz

Edit apache-tomcat-6.0.18/bin/catalina.sh with your preferred editor

vi apache-tomcat-6.0.18/bin/catalina.sh

Insert the following before the OS specific support line.  This line will set 
the minimum and maximum heap size (memory).  -Xms is the minimum and -Xmx is 
the maximum.  Your account level determines what the maximum allowed is.   
We prefer you keep the minimum set to 8MB as it leaves unneeded memory available
to the system for caching and buffering to improve the overall performance of 
the server.

Max Memory for each account account level.
------------------------------------------------------
Level 2.1 – 64m
Level 3.1 – 128m
Corporate – 192m
Corporate Plus – 256m

CATALINA_OPTS="-Xms8m -Xmx128m"

Insert the following line as well.  This sets JAVA_HOME for Tomcat.  You can 
point this to one of the many JDK’s we have available in /usr/local or point 
it to your own if you have installed a JDK into your account.

export JAVA_HOME=/usr/local/jdk1.5

 Save and close catalina.sh

Next we need to modifiy apache-tomcat-6.0.18/conf/server.xml to use the port 
range assigned to your account.  If you are unsure of what port range you have 
assigned to your account you can login to the members section with the following URL.

https://www.kattare.com/members/domains_main.kvws

Expand the information on your site and find the Private Port Range value.  For 
the following instructions we will use 10200 as the value listed here.  10200 
means you would have 10200-10209 available on your account.

Since we will just be modifying lines here I will provide the line you are looking 
for and what is should look like after the modification.

Edit apache-tomcat-6.0.18/conf/server.xml with your favorite editor.

vi apache-tomcat-6.0.18/conf/server.xml

Find:
<Server port="8005" shutdown="SHUTDOWN">
Replace with:
<Server port="10205" shutdown="SHUTDOWN">

Find:
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
Replace with:
<Connector port="10200" protocol="HTTP/1.1"
               maxThreads="150" connectionTimeout="20000"
               proxyPort="80" />

Find:
    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />
Replace with:
    <Connector port="10203" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />
   
Find:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
Replace with:
<Connector port="10209" protocol="AJP/1.3" minSpareThreads="25" maxSpareThreads="150" redirectPort="10203" />
 
Find:
    <Engine name="Catalina" defaultHost="localhost">
Replace with:
    <Engine name="Catalina" defaultHost="www.YOURDOMAIN.COM">

Find:
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
Replace with:
      <Host name="www.YOURDOMAIN.COM"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
        <Alias>YOURDOMAIN.COM</Alias>
        
Save and close the file.

This ends the modifications you need to get a custom Tomcat instance working on
a Kattare account.  This information suppliments the documentation found at 
http://tomcat.apache.org/ and the RUNNING.txt file found in the extracted download.


[FAQ Main] [Submit a Question]

[Back to Category "JSP-Java Servlets"]


whitespace image
green spacer

 [Getting Started]  [JSP & Java]  [Ruby & Rails]  [Email & Webmail]

Kattare Logo
whitespace image
 
whitespace image
whitespace image