Something Different In Linux

Home » How to » How to Install tomcat 6 on cpanel server

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
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/ from the old Tomcat install to the new Tomcat install

7) Restart the tomcat
root@server [/]# /usr/local/jakarta/tomcat/bin/
root@server [/]# /usr/local/jakarta/tomcat/bin/

8 ) Then restart the Apache
root@server [/]#  /etc/init.d/httpd restart

9) Check Tomcat Version

root@server [/]# sh /usr/local/jakarta/tomcat/bin/


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.

Comments are closed.

Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...