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.

Tomcat install

Discussion in 'cPanel Developers' started by mike47, Aug 21, 2007.

  1. mike47

    mike47 Member

    Joined:
    Oct 8, 2002
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I have a very simple question after reading all the posts on Cpanel 11 and Tomcat. First it's gone then it's back etc etc ............
    I am on Cpanel 11 Stable 16448, If I load Tomcat from WHM Plugins will it work or not?
    Thank You ahead of time if someone can give a simple answer.
     
  2. xeonex

    xeonex Well-Known Member

    Joined:
    Mar 20, 2005
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    mm ido not think it works
    i used to run severlat jsp sites that i had to move to a pl*sk box cause all problems running tomcat on a cPanel.
    by the way i had a trouble ticket opened with cPanel from my data center scince 6 days ago and no one was able to made tomcat run again
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    At this time, I would recommend you only use the Tomcat Installation functionality if you are an experienced Tomcat administrator.
     
  4. CrewXp

    CrewXp Active Member

    Joined:
    Nov 12, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    is there any update to this? There's no Tomcat installation option in the Plugins section, or the Update Apache section.

    I was requested by a client to have mysql-connector-java installed. I think this is Tomcat, but I'm not sure, thx.
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    mysql-connector-java is not Tomcat in and of itself, it's the JDBC driver for MySQL. You can find it on MySQL's website.

    I haven't heard any news regarding re-enabling Tomcat in Stage 1 builds yet. It seems the developers are focusing their efforts on Tomcat support for Stage 2 at the moment. Essentially they're trying to make sure using Tomcat on cPanel/WHM will not be the bumpy ride that it was in previous versions of cPanel/WHM.
     
  6. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Am I right in understanding this to mean that, at the moment, there is no Tomcat in cPanel 11 STABLE?

    I am in a bit of a catch-22 situation. I need to install JDK1.3 for a client (their payment gateway needs it) and am on cPanel 10.9 right now, but Tomcat on this version is broken and bug-ridden and on cPanel11, it isn't available yet. I am left scratching my head:confused:

    Is there any other, non-cPanel dependent way to install JDK 1.3? If yes, what will happen when I run a cPanel update or upgrade?
     
  7. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    I installed Tomcat on WHM 11.2.0 cPanel 11.11.0-R16789. The install went fine except that it would not compile jvsc (which is used to manage the service). This was specific to my architecture (x86_64). I don't think non-x86_64 architectures would have the problem.

    In Cpanel 11 Release you'll find 'beta' support for Tomcat. This is supposed to change when EasyApache 3 is out after stage 2. Then I believe the idea is that Tomcat installs will be a non-issue and should well for all.

    But, the beta Tomcat support in current Cpanel 11 Release did work for me. If your architecture is x86_64, be prepared to have to download the jvsc sources and and do a little bit of work to get it installed to the point where it will fire up and run. It's not too difficult though, and I can share the steps with you to do it if you try on x86_64 and have problems.

    Mike
     
  8. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    mtindor, many thanks. I had completely forgotten this thread. Sorry.

    It's great to know that Tomcat beta works in cPanel11. Regarding x86-64, I suppose I should ask my hosting provider for confirmation?

    Thanks.
     
  9. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The jsvc source tarball that ships with all tomct releases (http://tomcat.apache.org) is severely out-of-date and will not compile on x86_64 architectures. The Tomcat project knows this but has not rectified this in the years since it was reported.

    The Tomcat installer in EA3 ships the most recent release of jsvc, resolving this particular issue.
     
  10. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    mtindor, my host confirmed that they're using an x86_64 architecture. Could you please share the steps for downloading jsvc directly and configuring it?
     
  11. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    meeven,

    What version of Cpanel are you running? Log into WHM and post the Cpanel/WHM version information in the top right corner.

    If you're running a server that has CURRENT or EDGE (something with EA3 - EasyApache3), you'll do things differently than I did.

    If you're running a RELEASE version, I may be able to help you. But I have to know first what you are running or it isn't worth me giving you the instructions.

    If you are running a RELEASE version, then go into WHM, then under Cpanel you'll find 'Plugins'. Click on that. Then go down to the Tomcat entry, checkmark 'install and keep updated' and install it.

    Once it has finished installing, see if it is running by doing a 'ps auwx |grep tomcat' to see if tomcat is running.

    If it isn't running after you've tried to install it this way, let me know.


    Otherwise, if you are running EDGE or CURRENT, I cannot help you as the instructions would be different. In EasyApache3, that comes as part of the latest CURRENT/EDGE releases, the problem with compiling Tomcat on x86_64 is supposed to be fixed and you'll need to follow the install methods for that.

    Mike
     
  12. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    I apologize, but I didn't write down what I did to get it running after all. I could do it again if i had to on a server that did _not_ have it installed. But I don't have the time to botch up my working system by testing it to give you the details.

    The problem is that the Tomcat folks continue to bundle an ancient version of jsvc with their releases, and this is what usually breaks on x86_64.

    IF you're running the latest RELEASE version and you want to try it. I think this is how it goes:

    1. Install Tomcat via WHM - select Plugins under the Cpanel selection, checkmark 'install and keep updated' and then install Tomcat

    2. From an SSH shell (as root) do this:

    Code:
    mkdir /root/tempdir
    cd /root/tempdir
    wget [url]http://apache.mirrors.hoobly.com/commons/daemon/binaries/commons-daemon-1.0.1.tar.gz[/url]
    tar zxvf commons-daemon-1.0.1.tar.gz
    cp commons-daemon-1.0.1/bin/jsvc.tar.gz /usr/local/jakarta/jakarta-tomcat-5.5.9/bin/
    cd /usr/local/jakarta/jakarta-tomcat-5.5.9/bin
    tar zxvf jsvc.tar.gz
    cd jsvc-src
    ./configure --with-java=/usr/local/jdk
    make
    cp jsvc ../
    cd ..
    chown tomcat:nobody jsvc
    /scripts/restartsrv_tomcat
    
    See if that works for you. Follow those directions exactly as I have stated. If you don't go into the right directories, when I have instructed you to, this isn't going to work.

    Mike
     
  13. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Thank you, Mike. I installed Tomcat first and grep showed the following:

    I guess that means it is installed and working.

    I then tried the next set of commands in SSH and came unstuck at the following:
    Not sure why I would get this permission denied error when I am logged in as su -

    Thanks for all your help so far.
     
  14. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    I asked my host to help, so they made the configure binary executable and ran the ./configure command for me. They then asked me to proceed from make onwards and I did. But, I got stuck at the following:

    Can I ignore this and move to the next command, cd ../(which basically just steps back up one level) and restart jsvc?

    Thanks,
    meeven
     
    #14 meeven, Oct 11, 2007
    Last edited: Oct 11, 2007
  15. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Well, I asked my host who said the following:
    I decided to ignore it and go ahead with the remaining steps and this is what I got:
    Does this look like the install went okay?
     
  16. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    I asked my web host if the install looked okay and they came back with this:

     
    #16 meeven, Oct 11, 2007
    Last edited: Oct 11, 2007
  17. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Yes, it looks like everything setup properly. Once you Install Servlets on an account/domain you can visit port 8080 on the domain and see the Tomcat page.
     
  18. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Thanks. That's a relief:)

    Bear with me but I have to ask the next dumb question. How/where do I install servlets on an account?

    Thanks in advance.
     
  19. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    A function should appear in WHM >> Account Functions named Install Servlets

    Click that link, select the account/domain and apply the settings.
     
  20. meeven

    meeven Well-Known Member

    Joined:
    May 8, 2007
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Thanks. That helped :)

    I know this isn't a cpanel support forum, but when I visit www.domain.com:8080 with or without the trailing slash, I get a timed out message. I restarted Apache but it didn't make a difference.
     
    #20 meeven, Oct 13, 2007
    Last edited: Oct 13, 2007
Loading...

Share This Page