Installing Tomcat 6 on a cPanel Server
The cPanel EasyApache system makes it easy to recompile Apache with various add-ons and modules. There’s even a checkbox for adding Tomcat. Unfortunately, this installs Tomcat 5.5, and I needed Tomcat 6.0. Here’s how I got it:
1) install Tomcat 5.5 using EasyApache (see this .pdf for details)
2) download and expand Tomcat 6 in /usr/local/jakarta
3) change the tomcat symlink to point to your new version (i.e. /usr/local/jakarta/apache-tomcat-6.0.XX)
4) from http://trulymanaged.com/blog/installation-of-tomcat6/:
#cd apache-tomcat-6.0.18
# cd bin
# tar xvfz jsvc.tar.gz
# cd jsvc-src
# chmod +x configure
# ./configure
# make
# cp jsvc ..
# cd ..
5) copy over any Host blocks from tomcat/conf/server.xml from the old Tomcat install to the new Tomcat install (you may or may not be able to set up new hosts through WHM)
6) copy over conf/workers.properties from the old Tomcat install to the new Tomcat install
7) start tomcat normally (/usr/sbin/starttomcat)
The /manager/html/ Tomcat manager application doesn’t load, though, so it’s not perfect.
If you ever need your old Tomcat back just stop Tomcat, flip the tomcat symlink back to the old install, and restart Tomcat.