luizfernandowb

Registered
Nov 24, 2010
1
0
51
Dear forum users, I wonder if anyone has managed to install Tomcat 6 or Tomcat 5.5.30 upgrade to version 6.0.x (latest version is currently 6.0.29) to work together with cPanel. I ask this because I have clients who need the latest version of cPanel visa applications have been run incompatible with the version 5.5.x yet If anyone has any tutorial forum and information about please help me. Thanks.:rolleyes:
 

tm2004

Member
Mar 1, 2005
23
0
151
We were wanting to install JIRA and Confluence from /http://www.atlassian.com and while it worked OK on Tomcat 5.5, since each program needed to be installed in different Tomcat containers, we were tight on RAM/Resources (have a 4gig RAM Centos 5 server).

Read that 6.0 is better with memory management so need to get to Tomcat6. And we were able to upgrade from Tomcat 5.5 to Tomcat 6. Was easier then I thought but having a few issues. First we started by using easyApache to install Tomcat 5.5.

1. Download and expand Tomcat 6 in /usr/local/jakarta. Be sure to change group owner to Nobody/Tomcat with 0755 (same as 5.5 directory).

2. Change the tomcat symlink to point to your new version (i.e. /usr/local/jakarta/apache-tomcat-6.0.XX)

3. Then follow below:

Code:
# cd apache-tomcat-6.0.33
# cd bin
# tar xvfz commons-daemon-native.tar.gz
# cd commons-daemon-1.0.7-native-src
# cd unix
# chmod +x configure
# ./configure
# make
# cp jsvc ..
# cd ..

4. Then start as follows:

Code:
# su tomcat
# /usr/local/jakarta/tomcat/bin/startup.sh
Note: to shutdown:
Code:
# /usr/local/jakarta/tomcat/bin/shutdown.sh
5. Uncomment users to check Tomcat Manager, this file: /usr/local/jakarta/tomcat/conf/tomcat-users.xml

Add/ucomment below:
Code:
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="root" password="newone" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>

<role rolename="manager-gui"/>
<user username="tomcat" password="secret" roles="manager-gui"/>

</tomcat-users>
6. Then with that, you should be able to login to Tomcat Manager: /http://youdomain.com:8080
with
User: tomcat
Password: secret

7. Check and be sure it's running OK.
 
Last edited:

tm2004

Member
Mar 1, 2005
23
0
151
OK, so everything was OK with the upgrade until cPanel or us needed to restart Apache, and then things came to a screaming hault :(

Apache would *not* restart. Everything else seemed to be ok, but getting errors. The is from the WHM Restart services for Apache.

When we switched back Step #2 above (Change BACK the tomcat symlink to point to your 5.5 version (i.e. /usr/local/jakarta/apache-tomcat-5.5.33) it restarted just fine.

Restarting Apache Web Server

Apache restart failed. Unable to load pid from pid file and no httpd process found in process list.

If apache restart reported success but it failed soon after, it may be caused by oddities with mod_ssl.

You should run /usr/local/cpanel/scripts/ssl_crt_status as part of your troubleshooting process. Pass it --help for more details.

Also be sure to examine apache's various log files.
Apache Restart Output:
[Sat Oct 15 15:19:18 2011] [error] [client 24.215.149.177] File does not exist: /home/apnew/public_html/crossdomain.xml
[Sat Oct 15 15:19:18 2011] [error] [client 24.215.149.177] File does not exist: /home/apnew/public_html/404.shtml
[Sat Oct 15 15:19:24 2011] [notice] caught SIGTERM, shutting down
Looking at error logs now.
 

tm2004

Member
Mar 1, 2005
23
0
151
OK, so issue was http conf files were looking for below two, which were not within Tomcat 6. We copied the two from 5.5.x to 6.0.x and now we can restart Apache via WHM without errors.

Yeah, kind of random to just copy them over, but it seemed to work and in looking at the files, they were pretty simple.

/usr/local/jakarta/apache-tomcat-6.0.33/conf/workers.properties

and

/usr/local/jakarta/apache-tomcat-6.0.33/conf/httpd-jk.conf

fingers crossed :)
 

tm2004

Member
Mar 1, 2005
23
0
151
wow, forgot about this, then recompiled Apache for PHP upgrade. That broke our upgrade to TomCat 6.0, then found my own post. Great Karma. Anyway above worked like a champ :)
 

m0rpheu5

Well-Known Member
Jun 16, 2005
75
0
156
Brazil, Curitiba/PR
cPanel Access Level
Root Administrator
wow, forgot about this, then recompiled Apache for PHP upgrade. That broke our upgrade to TomCat 6.0, then found my own post. Great Karma. Anyway above worked like a champ :)
I know that this is an old post, but is the only one that i found with something about everything that i´m needing, i do everything, but i´m getting problem, when i did this and open my application, i got an Apache Tomcat/6.0.37 - Error Report saying The requested resource is not available, and if i change the link from tomcat to the old, the application run fine, what could be?

Thanks