Installing Tomcat 6 on a cPanel Server


The cPanel EasyApache system makes it easy to recompile Apache with various add-ons and modules. There’s even a checkbox for adding Tomcat. Unfortunately, this installs Tomcat 5.5, and I needed Tomcat 6.0. Here’s how I got it:

1) install Tomcat 5.5 using EasyApache (see this .pdf for details)

2) download and expand Tomcat 6 in /usr/local/jakarta

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

4) from http://trulymanaged.com/blog/installation-of-tomcat6/:

#cd apache-tomcat-6.0.18
# cd bin
# tar xvfz jsvc.tar.gz
# cd jsvc-src
# chmod +x configure
# ./configure
# make
# cp jsvc ..
# cd ..

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

7) start tomcat normally (/usr/sbin/starttomcat)

The /manager/html/ Tomcat manager application doesn’t load, though, so it’s not perfect.

If you ever need your old Tomcat back just stop Tomcat, flip the tomcat symlink back to the old install, and restart Tomcat.

8 Comments

  1. Pingback by Tomcat version 6.x (via EasyApache) - cPanel Forums on 2010-09-16 3:07 pm

    […] require Tomcat 6.0 for my application. I've found this partial solution on someone else's site: Installing Tomcat 6 on a cPanel Server | steve hulet Version 6.0 was released 4 years ago, could we please get this […]

  2. Comment by Thom on 2010-12-17 9:08 pm

    The tar file (jsvc.tar.gz) is now called commons-daemon-native.tar.gz. Apart from that, these instructions are still good.

  3. Comment by Z on 2011-09-03 2:33 am

    Hello,

    After doing this, everything worked fine. However, at some pointed, i wanted to restart Tomcat, I did this through WHM; but since then, the service always appear as down. How to solve this issue?

    Regards

  4. Comment by Mike Janick on 2011-10-14 6:48 pm

    Thanks for this. Here is the updated steps with the new Tomcat 6.0.33. Assumes UNIX install.

    # 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 ..

  5. Comment by Mike Janick on 2011-10-14 6:51 pm

    @Z – Restart is as follows:

    # su tomcat
    # /usr/local/jakarta/tomcat/bin/shutdown.sh
    then
    #/usr/local/jakarta/tomcat/bin/startup.sh

    WHM/cPanel just messes it up. There is a way to add the start-up scripts to cPanel startup but forget how. Note, when your cPanel server goes down – including cPanel upgrades, you have to restart Tomcat via SSH.

  6. Comment by Olaf on 2012-07-24 11:20 am

    Hello. . . Thanks for you help.

    I got a question… What is the symlink and where is this placed??

    Thank you in advance!!

  7. Comment by hulet on 2012-07-31 9:31 am

    The tomcat symlink is in /usr/local/.

  8. Comment by O.Aribi on 2013-01-25 12:05 pm

    Hello, can anyone help me out here? i’m looking for someone to install tomcat 6.xx in a cpanel server.
    Please get back to me asap.

Comments RSS

Sorry, the comment form is closed at this time.


powered by WordPress     themed by Mukkamu     presented by ideaharbor.org     everything else by steve hulet