The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to upgrade tomcat from 5.5 to 7 on cpanle server

Discussion in 'Database Discussions' started by yasir.iqbal12, Jan 12, 2012.

  1. yasir.iqbal12

    yasir.iqbal12 Member

    Joined:
    Jan 1, 2012
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Dear All,
    Tomcat 5.5 is installed om my cpanel server through easyapache utility and working perfectly fine. I am using the following instructions to upgrade the tomcat server but after doing these instruction tomcat not working when start the tomcat server from WHM.

    I have follow the following instruction. Please help me.


    Installing Tomcat 7 on a cPanel Server

    When you have installed tomcat by using Easy-Apache then it installed Tomcat 5.5 and if you want to installed Tomcat 7.0.11 then you need to made some necessary changes on the server.

    1) First install Tomcat 5.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 symbolic link tomcat. For example:
    [~]# ll /usr/local/jakarta
    drwxr-xr-x 4 tomcat nobody 4096 Apr 5 17:15 ./
    drwxr-xr-x 22 root root 4096 Mar 5 15:39 ../
    drwxr-xr-x 12 tomcat nobody 4096 Apr 4 17:02 apache-tomcat-5.5.30/
    lrwxrwxrwx 1 tomcat nobody 39 Apr 4 17:04 tomcat -> /usr/local/jakarta/apache-tomcat-5.5.30/

    2) Then download and extract Tomcat 7 in /usr/local/jakarta directory
    [~]# cd /usr/local/jakarta
    [/usr/local/jakarta]# wget http://apache.cs.utah.edu/tomcat/tomcat-7/v7.0.11/bin/apache-tomcat-7.0.11.tar.gz
    [/usr/local/jakarta]# tar -xzvf apache-tomcat-7.0.11.tar.gz

    3) Then Change the tomcat symbolic link to point to your new version (i.e. /usr/local/jakarta/apache-tomcat-7.0.11)
    [/usr/local/jakarta]# ln -s /usr/local/jakarta/apache-tomcat-7.0.11 tomcat
    Now it shows
    [~]# ll /usr/local/jakarta
    drwxr-xr-x 4 tomcat nobody 4096 Apr 5 17:15 ./
    drwxr-xr-x 22 root root 4096 Mar 5 15:39 ../
    drwxr-xr-x 12 tomcat nobody 4096 Apr 4 17:02 apache-tomcat-5.5.30/
    drwxr-xr-x 9 tomcat nobody 4096 Apr 4 17:01 apache-tomcat-7.0.11/
    lrwxrwxrwx 1 tomcat nobody 39 Apr 4 17:04 tomcat -> /usr/local/jakarta/apache-tomcat-5.5.30/

    4) Then compile the new Tomcat version on cPanel server.
    [~]# cd /usr/local/jakarta/apache-tomcat-7.0.11
    [/usr/local/jakarta/apache-tomcat-7.0.11]# cd ./bin
    [/usr/local/jakarta/apache-tomcat-7.0.11/bin]# tar xvfz commons-deamon-native.tar.gz
    [/usr/local/jakarta/apache-tomcat-7.0.11/bin]# cd commons-daemon-1.0.x-native-src/unix
    [/usr/local/jakarta/apache-tomcat-7.0.11/bin/commons-daemon-1.0.x-native-src/unix]# ./configure
    [~]# make
    [~]# cp jsvc ../..
    [~]# cd ../../..

    5) Copy over any Host blocks from /usr/local/jakarta/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 /usr/local/jakarta/tomcat/conf/workers.properties from the old Tomcat install to the new Tomcat install.

    7) Restart the server
    [/]# reboot
    Or
    [/]# /usr/local/jakarta/tomcat/bin/shutdown.sh
    [/]# /usr/local/jakarta/tomcat/bin/startup.sh
    [/]# /etc/init.d/httpd restart

    9) Check Tomcat Version
    [/]# sh /usr/local/jakarta/tomcat/bin/version.sh
    The cPanel EasyApache system makes it easy to recompile Apache with various add-ons and modules.
    If you ever need your old Tomcat back just stop Tomcat, flip the tomcat symbolic link back to the old install, and restart Tomcat.


    Please help me.
     
  2. a24uall

    a24uall Active Member

    Joined:
    Feb 4, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    I just read through the steps
    It seems u have forgot to change the permission of
    /usr/local/jakarta/apache-tomcat-7.0.28

    Before the changes it was
    drwxr-xr-x 11 tomcat nobody 4096 Jun 19 19:55 apache-tomcat-5.5.35/

    So try changing the permission for entire folder and files/folders inside that as well.
     
Loading...

Share This Page