The latest Tomcat version supported in cPanel/WHM is v5.5.27 and can be installed safely using EasyApache. To install tomcat in WHM 11.25, you will need to run /scripts/easyapache and once complete, access it from the tomcat manager or admin control panel. Once easy apache completes, you will need to go to http://localhost:8080/manage to utilize the web interface.
To install servlets for a account/user, access the option Main >> Account Functions >> Install Servlets from WHM as root and select the domain on which you want to install servlets. Click on Install. This will install servlets on the account/user you have selected.
To install the tomcat admin interface (which is not installed with the easyapache build)
cp apache-tomcat-5.5.12-admin.tar.gz temp/
tar -xzvf apache-tomcat-5.5.12-admin.tar.gz
cp conf/Catalina/localhost/admin.xml /usr/local/jakarta/tomcat/conf/Catalina/localhost/
cp -R admin/ /usr/local/jakarta/tomcat/webapps
Add a line to your tomcat-users.xml file so that you have a user who has admin role. For example, add this line just before the last line (containing ) of the file:
Now when you visit http://localhost:8080/admin you should see a page that asks for a user name and password. If you still see the “no longer loaded” error message in your browser, you must either force a full reload of the web page (in Firefox, hold down Shift key while clicking on the Reload button) or just restart your browser completely.
To remove Tomcat execute the following commands:
rm -f /usr/sbin/starttomcat
rm -f /usr/sbin/startomcat
rm -f /usr/sbin/stoptomcat
Important: Remove all mod_jk lines from httpd.conf, including addmodule, loadmodule, and include line.