Migrate TOMCAT from Redhat TO CentOS

furquan

Well-Known Member
Jul 27, 2002
473
4
168
Hello All :

I have an old RHEL Linux ES release 4 cPanel Server which is running tomcat 5.5.28 on a VM.

Now i need to migrate this server to a CentOS 5.6 VM

Can any one suggest me all the appropriate files and settings that i need to copy to make sure the transition is smooth .

Any suggestion would be really appreciated.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello furquan,

The files should all be located in /usr/local/jakarta/apache-tomcat-5.5.28 location. Most of them should be the same no matter what version of Tomcat is installed, but the server.xml in /usr/local/jakarta/apache-tomcat-5.5.28/conf/ location would contain the domain configurations.

Additionally, there will be configuration include files in /usr/local/apache/conf/userdata/std/ location for each individual user and domain (the path will vary depending on your Apache version so I can't provide the exact path). These will be called cp_jkmount.conf for each file for each user and contain the following lines approximately:

Code:
<IfModule mod_jk.c>
  JkMount /*.jsp ajp13
  JkMount /servlet/* ajp13
  JkMount /servlets/* ajp13
</IfModule>
You could simply install Tomcat onto the new machine and re-add JSP for each domain listed in /usr/local/jakarta/apache-tomcat-5.5.28/conf/server.xml file. If the accounts have war files, they should auto extract on Tomcat restart anyway for the domain addition, so you shouldn't have to copy anything beyond making sure each domain has JSP and servlets installed onto it. The version of Tomcat cPanel uses in the newest EasyApache is 5.5.33, which isn't that much later than the version you are using right now.

The only reason I can even see copying that data would be if you've made any configurational changes to the server.xml beyond the default settings.
 

furquan

Well-Known Member
Jul 27, 2002
473
4
168
cPanelTristan :)

As always Thank you so very much, One quicky ..How can i add JSP for the domains listed in the server.xml file ? do we have to do it via WHM or cli ?

Thank you
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

You can use Web Host Manager or the command line to install servlets for each domain name:

Code:
"WHM >> Account Functions >> Install Servlets"
Or;

Code:
/scripts/addservlets --domain=example.com
Thank you.
 

furquan

Well-Known Member
Jul 27, 2002
473
4
168
Thank you cPanelMichael ,

In fact i realized that after i entered my previous response ;)