Tomcat 4.0 and 10.1

Oct 07, '01 08:38:23AM

Contributed by: christiank

Here is a working solution in how to setup Tomcat 4.0 on 10.1 to run locally:

Before you start with the steps below put your current version of Stuffit Expander into the trash can. You can put it back after you are through with the installing. [Editor's note: I think you could also just make sure that you uncheck "tar" and "gz" files in Expander's "Internet" prefs, but haven't tested that myself.]

Read the rest of this article for a step-by-step on getting Tomcat running locally. I am working on a solution to set up Tomcat with Apache at the moment and will post a follow up on this. If anyone has Tomcat 4.0 with Apache on 10.1 running, please post a solution or any helpful comments.

How to install Tomcat on OS X 10.1:

  1. Open the terminal and get root access.
    Example: [co3029016-a:~] christia% su
    Password:

  2. Navigate to the folder you want tomcat running; my path is /Library/WebServer/
  3. Get the jakarta-tomcat-4.0.tar.gz build:
    curl -O http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0/jakarta-tomcat-4.0.tar.gz
  4. Rename the file jakarta-tomcat-4.0.tar.gz to jakarta-tomcat-4.0.tar
  5. Unzip the file: gnutar zxf jakarta-tomcat-4.0.tar
  6. Set your environment for CATALINA_HOME and JAVA_HOME:
    setenv CATALINA_HOME /Library/WebServer/jakarta-tomcat-4.0
    setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home/

  7. Navigate to the bin directory in your jakarta-tomcat-4.0 folder and type "./startup.sh" in the terminal or call it with the CATALINA_HOME variable.
  8. Open your browser and type "http://localhost:8080/" and you will see the index page of your tomcat folder.
To keep the environment variables after every restart, you have to create a .tcshrc file into your home directory (note, that the "." dot in the beginning of the file name is neccessary). You can put all your stuff into that file:
  1. Open the Terminal (by default you are in your home directory, to make that sure try pwd (print working directory) to show you your current path. If it is not your home directory change into it by cd $HOME)
  2. Create the .tcshrc file: touch .tcshrc
  3. Edit the .tcshrc file: open -e .tcshrc
  4. Enter the following lines:
    setenv CATALINA_HOME /Library/WebServer/jakarta-tomcat-4.0
    setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home/
  5. Don't forget to enter a return after the last line.
  6. Save it and restart the Terminal
Now you have the variables predefined.

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20011007083823889