Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 25
  1. #1
    Member
    Join Date
    Feb 2003
    Posts
    118

    Post [Case 2096] Tomcat Installation on FreeBSD

    Greetings all.

    I did a search and noticed there isn't much discussion about Tomcat running on FreeBSD. And after getting few comments from quite a few people saying that FreeBSD and Tomcat/Java don't mix, I went ahead and see if I can prove them wrong.


    After nearly 2 days of having the server kicking my ass, I finally lassoed it in and got it working beautifully. It requires some modification in the jsp-4-install script to comment out two RPM packages requirement since it is geared for Linux. Secondly, you will need to install the java into the system by modifying the port requirement file for the latest sun or blackdown java and then make a few links for jre and jsdk to the java directory.

    Once that, do the FreeBSD port of the Tomcat installation to get few other things that is left out to be added in. Once that is done. remove the tomcat installation directory out. Then go back and run the jsp-install script to install the Cpanel version of Tomcat in it.

    Then..you gotta go into the /usr/local/jakarta/ directory and go into the tomcat build directory and find the jk2_mod.so file and toss it over into Apache libexec directory. Then...restart the sucker and apache and voila...you got a working FreeBSD with Java support.

    It take a little bit of trial and error to make it work but once you get the java part working, everything else is cakewalk from there.

    It is built on FreeBSD-4.7-Stable Release.

  2. #2
    Member
    Join Date
    May 2003
    Location
    San Jose, CA
    Posts
    36

    Default

    what links to jre or java directory?
    -mark

  3. #3
    Member
    Join Date
    May 2003
    Location
    San Jose, CA
    Posts
    36

    Default

    Thought I had it... but:

    lib/xmlParserAPIs.jar -> /usr/local/jakarta/lib/xmlParserAPIs.jar
    ... Bootstrapping Ant Distribution
    ... Compiling Ant Classes
    java.lang.OutOfMemoryError:
    at java.util.Hashtable.rehash(Hashtable.java)
    at java.util.Hashtable.put(Hashtable.java)
    at sun.tools.asm.ConstantPool.put(ConstantPool.java)
    at sun.tools.asm.NameAndTypeConstantData.<init>(NameAndTypeConstantData.java)
    at sun.tools.asm.ConstantPool.put(ConstantPool.java)
    at sun.tools.asm.FieldConstantData.<init>(FieldConstantData.java)
    at sun.tools.asm.ConstantPool.put(ConstantPool.java)
    at sun.tools.asm.Instruction.collect(Instruction.java)
    at sun.tools.asm.Assembler.collect(Assembler.java)
    at sun.tools.javac.SourceClass.compileClass(SourceClass.java)
    at sun.tools.javac.SourceClass.compile(SourceClass.java)
    at sun.tools.javac.Main.compile(Main.java)
    at sun.tools.javac.Main.main(Main.java)
    error: An error has occurred in the compiler; please file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
    Note: 10 files use deprecated APIs. Recompile with "-deprecation" for details.
    1 error, 1 warning
    ... Failed compiling Ant classes !


    Did you run into this? I've tried withjdk 1.3.1 and jre 1.8.1.. (previously installed) I'll try with 1.4 i guess..
    -mark

  4. #4
    Member
    Join Date
    Mar 2002
    Location
    San Francisco
    Posts
    257

    Default

    Secondly, you will need to install the java into the system by modifying the port requirement file for the latest sun or blackdown java and then make a few links for jre and jsdk to the java directory.
    Hi Elikster,

    I am interested in moving from RedHat to freeBSD. I am curious what your modifications were? Would you be so kind as to share that?

    Also, which java directory? Thanks

  5. #5
    Member
    Join Date
    Jun 2003
    Posts
    42

    Default

    I am interested also.

    thank you.

  6. #6
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    Count me in, too.

  7. #7
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    I don't have a freebsd box (yet), but this should help:
    http://www.freebsd.org/doc/en_US.ISO...s/java-tomcat/

  8. #8
    Member
    Join Date
    Jun 2003
    Posts
    42

    Default FreeBSD Tomcat how to?

    Does anyone have a good tomcat + freebsd installation guide? i saw an old thread but it was very vague.

  9. #9
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    Search on google for "tomcat freebsd". The very first reult is a detailed guide. Not sure how well it works with cpanel, though.

  10. #10
    Registered User
    Join Date
    Dec 2003
    Posts
    4

    Exclamation Apache + Tomcat. Urgent!

    Hi All,

    Maybe someone had experience with Tomcat + Apache.
    We need to make Tomcat working using virtual hosts.
    for the moment we have following:

    Tomcat - /usr/local/jakarta/
    We start applications from ./webapps/. If we put there smth like servlet.war it works ok.

    Exists catalog /home/tester/public_html/servlet. When we add to config following, nothing works .....

    <Host name="www.domain.com" debug="0" unpackWARs="true"
    autoDeploy="true">
    <Context path="" docBase="/home/tester/public_html/servlet"
    crossContext="true"
    debug="0"
    reloadable="false"
    trusted="false">
    </Context>
    </Host>

    Could someone help, because we soent about 2 weeks on one place.

    OS - FreeBSD 4.9

    Thanks!
    Last edited by Eugene Rozum; 01-05-2004 at 01:20 PM.

  11. #11
    Registered User
    Join Date
    Dec 2003
    Posts
    4

    Default

    Anyone ?

  12. #12
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    Originally posted by casey
    I don't have a freebsd box (yet), but this should help:
    http://www.freebsd.org/doc/en_US.ISO...s/java-tomcat/
    Okay, got my freebsd box. Using the above tutorial, I was able to install tomcat 4.1.29 on my box. Somehow, though, I need to connect it with apache (right now I can only access it on port 8080--where it is working perfectly). Does anyone know where I can get the connectors for 4.1.29? I'll keep looking.

    In the meantime, in the above tutorial, be sure and replace
    /usr/ports/java/linux-jdk13 (which does not exist)
    with
    /usr/ports/java/linux-sun-jdk13
    and after you finish that
    go to /usr/ports/java/jdk13 and run
    make all install clean

    Everything else is pretty straight forward.

  13. #13
    Member
    Join Date
    Jun 2003
    Posts
    42

    Default

    Yah i managed to install all of these, even resin and jboss but i am having a problem connecting it with cpanel and apache.

  14. #14
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    Well, I noticed that the load, memory, and cpu went sky high on FreeBSD with tomcat. So I'm wiping out the OS and putting in Redhat 9. I'm hoping that when Fedora quits supporting it in about 2 years that cPanel will have developed its own OS based on RH9...

  15. #15
    Member
    Join Date
    Jun 2003
    Posts
    42

    Default

    So how would you make jsp tomcat work with apache and virtualhost once you install it and it works through port 8080 ?

Similar Threads & Tags
Similar threads

  1. Tomcat Installation Problem
    By wisperz in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-10-2007, 10:04 AM
  2. Tomcat installation
    By rhytha in forum New User Questions
    Replies: 3
    Last Post: 06-06-2007, 04:50 PM
  3. installation of TOMCAT does not run
    By stacman in forum cPanel Developers
    Replies: 3
    Last Post: 05-17-2005, 07:27 AM
  4. Tomcat installation failure
    By Stefaans in forum cPanel Developers
    Replies: 2
    Last Post: 10-15-2004, 02:34 PM
  5. About Tomcat 5 installation
    By kashif in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 08-12-2004, 03:05 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube