If you are having cPanel server and wish to upgrade the existing Tomcat Version Or wish to install Tomcat 7 on it but don’t know how to go about it..

You may simply refer to this article.

If you do not have Tomcat installed on your cPanel server, first get it . For doing so perform /scripts/easyapache with Tomcat module.

On latest cPanel server the Tomcat version “5.5.36” gets installed at path /usr/local/jakarta. Now to upgrade this you can follow these instructions

Go to the directory

root@vps [~]# cd /usr/local/jakarta/

The installatiion looks like below

root@vps [/usr/local/jakarta]# ll

total 12
drwxr-xr-x 3 tomcat nobody 4096 Jan 15 00:58 ./
drwxr-xr-x 24 root root 4096 Jan 15 00:59 ../
drwxr-xr-x 12 tomcat nobody 4096 Jan 15 00:59 apache-tomcat-5.5.36/
lrwxrwxrwx 1 tomcat nobody 39 Jan 15 00:58 tomcat -> /usr/local/jakarta/apache-tomcat-5.5.36/

Now lets begin with the upgradation of Tomcat.

Download the Binery

root@vps [/usr/local/jakarta]# wget http://apache.techartifact.com/mirror/tomcat/tomcat-7/v7.0.34/bin/apache-tomcat-7.0.34.tar.gz

Extract the downloaded Binary

root@vps [/usr/local/jakarta]# tar -xzvf apache-tomcat-7.0.34.tar.gz

Un-link the orignal tomcat installation

root@vps [/usr/local/jakarta]# unlink tomcat

Now Link it to the downloaded Latest Tomcat version

root@vps [/usr/local/jakarta]# ln -s /usr/local/jakarta/apache-tomcat-7.0.11 tomcat

It should apear as below

root@vps [/usr/local/jakarta]# ll
total 7592
drwxr-xr-x 4 tomcat nobody 4096 Jan 15 02:24 ./
drwxr-xr-x 24 root root 4096 Jan 15 00:59 ../
drwxr-xr-x 12 tomcat nobody 4096 Jan 15 02:26 apache-tomcat-5.5.36/
drwxr-xr-x 9 root root 4096 Jan 15 02:24 apache-tomcat-7.0.34/
-rw-r–r– 1 root root 7744774 Dec 4 21:58 apache-tomcat-7.0.34.tar.gz
lrwxrwxrwx 1 tomcat nobody 39 Jan 15 00:58 tomcat -> /usr/local/jakarta/apache-tomcat-7.0.34/

Now lets begin with the compilation

root@vps [/usr/local/jakarta]# cd apache-tomcat-7.0.34

root@vps [/usr/local/jakarta/apache-tomcat-7.0.34]# cd bin/

root@vps [/usr/local/jakarta/apache-tomcat-7.0.34/bin]# tar -xzvf commons-daemon-native.tar.gz

root@vps [/usr/local/jakarta/apache-tomcat-7.0.34/bin]# cd commons-daemon-1.0.10-native-src/unix/

root@vps [/usr/local/jakarta/apache-tomcat-7.0.34/bin/commons-daemon-1.0.10-native-src/unix]# ./configure

root@vps [/usr/local/jakarta/apache-tomcat-7.0.34/bin/commons-daemon-1.0.10-native-src/unix]# make

Copy jsvc to the bin folder

root@vps [/usr/local/jakarta/apache-tomcat-7.0.34/bin/commons-daemon-1.0.10-native-src/unix]# cp jsvc ../..

Copy over /usr/local/jakarta/apache-tomcat-5.5.36/conf/workers.properties & /usr/local/jakarta/apache-tomcat-5.5.36/conf/server.xml to /usr/local/jakarta/apache-tomcat-5.5.36/conf/ย directory

Now restart the tomcat server as described in the Article HERE