How to install tomcat 6 on the linux server ?
When you have installed tomcat by using Easy-Apache then it installed Tomcat 5.5 and if you want to installed Tomcat 6.0 then you need to made some necessary changes on the server.
1) First install Tomcat 5 by using Easy-Apache means java is also installed at the time of Easy-Apache.
The tomcat 5 is installed in “/usr/local/jakarta/” directory with the simlink “tomcat”
For Ex.
root@server [/]# cd /usr/local/jakarta
root@server [/usr/local/jakarta] ll
drwxr-xr-x 3 tomcat nobody 4096 Oct 12 21:36 apache-tomcat-5.5.28/
lrwxrwxrwx 1 root root 40 Oct 12 19:51 tomcat -> /usr/local/jakarta/apache-tomcat-5.5.28/
2) Then download and extract Tomcat 6 in /usr/local/jakarta directory
root@server [/]# cd /usr/local/jakarta
root@server [/usr/local/jakarta]# wget http://mirror.olnevhost.net/pub/apache//tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.tar.gz
root@server [/usr/local/jakarta]# tar -xzvf apache-tomcat-6.0.29.tar.gz
3) Then Change the tomcat symbolic link to point to your new version (i.e. /usr/local/jakarta/apache-tomcat-6.0.29)
root@server [/usr/local/jakarta]# ln -s /usr/local/jakarta/apache-tomcat-6.0.29 tomcat
Now it shows
root@server [/usr/local/jakarta]# ll
drwxr-xr-x 3 tomcat nobody 4096 Oct 12 21:36 apache-tomcat-5.5.28/
drwxr-xr-x 3 tomcat nobody 4096 Oct 12 21:36 apache-tomcat-6.0.29
lrwxrwxrwx 1 root root 40 Oct 12 19:51 tomcat -> /usr/local/jakarta/apache-tomcat-6.0.29/
4) Then compile the new tomcat version on cPanel server.
root@server [/]# cd /usr/local/jakarta/apache-tomcat-6.0.29
root@server [/]## cd bin
root@server [/]# tar xvfz jsvc.tar.gz
root@server [/]# cd jsvc-src
root@server [/]# chmod +x configure
root@server [/]# /configure
root@server [/]# make
root@server [/]# cp jsvc ..
root@server [/]# cd ..
5) Then you need to copy all the domain entry from old server.xml file to new server.xml file
6) copy over conf/workers.properties from the old Tomcat install to the new Tomcat install
7) Restart the tomcat
root@server [/]# /usr/local/jakarta/tomcat/bin/shutdown.sh
root@server [/]# /usr/local/jakarta/tomcat/bin/startup.sh
8 ) Then restart the Apache
root@server [/]# /etc/init.d/httpd restart
9) Check Tomcat Version
root@server [/]#
sh /usr/local/jakarta/tomcat/bin/version.sh
Done
Note : If you want to back to your old tomcat version then only change the symbolic link from new tomcat version to your old tomcat version directory.