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 install Tomcat 6 in cPanel?

Discussion in 'General Discussion' started by luizfernandowb, Nov 24, 2010.

  1. luizfernandowb

    luizfernandowb Registered

    Joined:
    Nov 24, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Dear forum users, I wonder if anyone has managed to install Tomcat 6 or Tomcat 5.5.30 upgrade to version 6.0.x (latest version is currently 6.0.29) to work together with cPanel. I ask this because I have clients who need the latest version of cPanel visa applications have been run incompatible with the version 5.5.x yet If anyone has any tutorial forum and information about please help me. Thanks.:rolleyes:
     
  2. tm2004

    tm2004 Member

    Joined:
    Mar 1, 2005
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    We were wanting to install JIRA and Confluence from /http://www.atlassian.com and while it worked OK on Tomcat 5.5, since each program needed to be installed in different Tomcat containers, we were tight on RAM/Resources (have a 4gig RAM Centos 5 server).

    Read that 6.0 is better with memory management so need to get to Tomcat6. And we were able to upgrade from Tomcat 5.5 to Tomcat 6. Was easier then I thought but having a few issues. First we started by using easyApache to install Tomcat 5.5.

    1. Download and expand Tomcat 6 in /usr/local/jakarta. Be sure to change group owner to Nobody/Tomcat with 0755 (same as 5.5 directory).

    2. Change the tomcat symlink to point to your new version (i.e. /usr/local/jakarta/apache-tomcat-6.0.XX)

    3. Then follow below:

    Code:
    # cd apache-tomcat-6.0.33
    # cd bin
    # tar xvfz commons-daemon-native.tar.gz
    # cd commons-daemon-1.0.7-native-src
    # cd unix
    # chmod +x configure
    # ./configure
    # make
    # cp jsvc ..
    # cd ..

    4. Then start as follows:

    Code:
    # su tomcat
    # /usr/local/jakarta/tomcat/bin/startup.sh
    
    Note: to shutdown:
    Code:
    # /usr/local/jakarta/tomcat/bin/shutdown.sh
    5. Uncomment users to check Tomcat Manager, this file: /usr/local/jakarta/tomcat/conf/tomcat-users.xml

    Add/ucomment below:
    Code:
    
    <tomcat-users>
    <role rolename="tomcat"/>
    <role rolename="role1"/>
    <user username="root" password="newone" roles="tomcat"/>
    <user username="both" password="tomcat" roles="tomcat,role1"/>
    <user username="role1" password="tomcat" roles="role1"/>
    
    <role rolename="manager-gui"/>
    <user username="tomcat" password="secret" roles="manager-gui"/>
    
    </tomcat-users>
    
    6. Then with that, you should be able to login to Tomcat Manager: /http://youdomain.com:8080
    with
    User: tomcat
    Password: secret

    7. Check and be sure it's running OK.
     
    #2 tm2004, Oct 15, 2011
    Last edited: Oct 15, 2011
  3. tm2004

    tm2004 Member

    Joined:
    Mar 1, 2005
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    OK, so everything was OK with the upgrade until cPanel or us needed to restart Apache, and then things came to a screaming hault :(

    Apache would *not* restart. Everything else seemed to be ok, but getting errors. The is from the WHM Restart services for Apache.

    When we switched back Step #2 above (Change BACK the tomcat symlink to point to your 5.5 version (i.e. /usr/local/jakarta/apache-tomcat-5.5.33) it restarted just fine.

    Looking at error logs now.
     
  4. tm2004

    tm2004 Member

    Joined:
    Mar 1, 2005
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    OK, so issue was http conf files were looking for below two, which were not within Tomcat 6. We copied the two from 5.5.x to 6.0.x and now we can restart Apache via WHM without errors.

    Yeah, kind of random to just copy them over, but it seemed to work and in looking at the files, they were pretty simple.

    /usr/local/jakarta/apache-tomcat-6.0.33/conf/workers.properties

    and

    /usr/local/jakarta/apache-tomcat-6.0.33/conf/httpd-jk.conf

    fingers crossed :)
     
  5. tm2004

    tm2004 Member

    Joined:
    Mar 1, 2005
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    wow, forgot about this, then recompiled Apache for PHP upgrade. That broke our upgrade to TomCat 6.0, then found my own post. Great Karma. Anyway above worked like a champ :)
     
  6. m0rpheu5

    m0rpheu5 Well-Known Member

    Joined:
    Jun 16, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brazil, Curitiba/PR
    cPanel Access Level:
    Root Administrator
    I know that this is an old post, but is the only one that i found with something about everything that i´m needing, i do everything, but i´m getting problem, when i did this and open my application, i got an Apache Tomcat/6.0.37 - Error Report saying The requested resource is not available, and if i change the link from tomcat to the old, the application run fine, what could be?

    Thanks
     
Loading...

Share This Page