Results 1 to 1 of 1
-
9th Jan 2008, 02:36 AM #1OPMember
Install multiple tomcat instances with cPanel x.xx
--------
This will help you install tomcat in one location and have multiple instances running for individual clients:
Why would you want to do this:
==============================
1) Install tomcat in 1 location and have x number of instances running on a per client basis
2) Upgrade tomcat and have it propagate to all clients
3) Limit the resources each tomcat instance uses
4) Tomcat runs as the individual user rather than "root" or "tomcat"
5) Each user has its own manager; hence, no security risk to others
6) Start/Stop/Restart tomcat instances without affecting other clients who also have a tomcat instance
Assumptions:
============
1. Tomcat is installed in: /usr/local/tomcat (TOMCAT_HOME)
2. Instances are installed in: /usr/local/tomcat/instances
3. Java is installed somewhere on your machine
Step 1 - Create a Tomcat Instance
=================================
- Create a directory in /usr/local/tomcat/instances/user1 (CATALINA_BASE)
- Create a set of directories (conf,temp,logs,webapps) in $CATALINA_BASE
- Copy web.xml,server.xml,tomcat-users.xml from $TOMCAT_HOME/conf to $CATALINA_BASE/conf
- Create a bash script called user1startstop.sh as follows and make it executable
Step 2 - Configure the Tomcat Instance
======================================
- edit $TOMCAT_BASE/conf/server.xml:
Replace: ... port=8005 with port 8101 ... This is shutdown port
Replace: ... port=8080 with port 8201 ... This is http port
Replace: ... port=8009 with port 8301 ... This is the AJP port
- edit $TOMCAT_HOME/conf/workers.properties
Add: user1 to worker.list=ajp12,ajp13...
Add:
worker.user1.host=localhost
worker.user1.port=8301
worker.user1.lbfactor=1
worker.user1.type=ajp13
Under:
DEFAULT ajp13 WORKER DEFINITION
Step 3 - Modify Main Tomcat (One-Time)
======================================
Edit $TOMCAT_HOME/bin/Tomcat5.sh
Add:
Modify start case with the following:
Modify end case with the following:
Step 3 - Configure Apache
=========================
- Edit httpd.conf
Add the following code under the VirtualHost definition of the user in question:
<IfModule mod_jk.c>
JkMount /*.jsp user1
JkMount /webapps/* user1
JkMount /servlets/* user1
JkMount /servlet/* user1
</IfModule>
Step 4 - Restart Apache
Step 5 - run $TOMCAT_INSTANCE/user1startstop.sh start
That's it.
I have 5 instances of tomcat running on my machine and it works like a charm.Lease Reviewed by Lease on . Install multiple tomcat instances with cPanel x.xx -------- This will help you install tomcat in one location and have multiple instances running for individual clients: Why would you want to do this: ============================== 1) Install tomcat in 1 location and have x number of instances running on a per client basis 2) Upgrade tomcat and have it propagate to all clients 3) Limit the resources each tomcat instance uses 4) Tomcat runs as the individual user rather than "root" or "tomcat" Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How To Install CPANEL on your VPS
By Albert.Nawaro in forum Tutorials and GuidesReplies: 0Last Post: 9th Feb 2012, 12:05 PM -
Multiple Instances - Windows Live Messenger 2011
By 0ccul7 in forum Technical Help Desk SupportReplies: 2Last Post: 9th Jul 2011, 01:17 PM -
Need some one to install vb in my cpanel
By Trusteduploader in forum Technical Help Desk SupportReplies: 2Last Post: 13th Mar 2011, 01:21 PM -
[Video TUT] Install Cpanel and Re-Install OS on a dedicated server
By black0xio in forum Server ManagementReplies: 18Last Post: 23rd Mar 2010, 06:25 AM -
TomCat ?
By Virendar in forum Technical Help Desk SupportReplies: 0Last Post: 17th Feb 2010, 05:56 PM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...