You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Apache Wiki <wi...@apache.org> on 2010/06/08 21:11:34 UTC

[Tomcat Wiki] Update of "TomcatOnMacOS" by PidSter

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification.

The "TomcatOnMacOS" page has been changed by PidSter.
http://wiki.apache.org/tomcat/TomcatOnMacOS?action=diff&rev1=16&rev2=17

--------------------------------------------------

  
  ==== THE ENVIRONMENT ====
  
- The following assumes you have Java already installed - it should be installed by default on every MacOS X installation.  Note that MacOS X 10.2 (''Jaguar'') comes with Java 1.3; MacOS X 10.3 (''Panther'') comes with Java 1.4.  MacOS X 10.4 (''Tiger'') comes with Java 1.4.2 installed, but Java 1.5 can be downloaded.  MacOS X 10.5 (''Leopard'') comes with Java 1.5.  It is possible to run Java 1.4 on MacOS X ''Jaguar'' but it may interfere with operation of the standard environment.
+ Java is installed by default on every MacOS X installation.  MacOS X 10.2 (''Jaguar'') comes with Java 1.3; MacOS X 10.3 (''Panther'') comes with Java 1.4.  MacOS X 10.4 (''Tiger'') comes with Java 1.4.2 installed, but Java 1.5 can be downloaded.  MacOS X 10.5 (''Leopard'') comes with Java 1.5.  MacOS X 10.5 (''Snow Leopard'') comes with Java 1.6.  It is possible to run Java 1.4 on MacOS X ''Jaguar'' but it may interfere with operation of the standard environment.
  
   ''{{{JAVA_HOME}}} is at {{{/Library/Java/Home}}}, but this is a link into a directory {{{/System/Frameworks/JavaJVM.Framework/Versions}}} which is used to switch between versions easily.  There is a link {{{Current}}} and {{{CurrentVersion}}} which matches up the current Java environment with the appropriate version.''
  
@@ -45, +45 @@

  
  ''Macintosh HD > Library > Tomcat >'' <extracted files>
  
- '''Step 3: Configure JAVA_HOME'''
- 
- We then need to set the {{{JAVA_HOME}}} environment variable - this is almost the same as setting the Windows XP environment variable.  
- 
- Doing this is easiest and best done with additional software to assist in setting the environment variables.
- 
- Recommended software is the preference pane '''RCEnvironment''' (http://www.rubicode.com/Software/RCEnvironment/)
- 
- Copy the RCEnvironment Preference Pane to ''Macintosh HD > Library > Preference Panes''.
- 
- Go to ''System Preferences'' and click on ''Environment Variables''.
- 
- The environment variable {{{JAVA_HOME}}} should be defined as {{{/Library/Java/Home}}}.
- 
- To do this, in the left hand column enter {{{JAVA_HOME}}} and in the right hand column enter {{{/Library/Java/Home}}}. Click ''Apply''.
- 
- '''Step 4: Configure tomcat-users.xml'''
+ '''Step 3: Configure tomcat-users.xml'''
  
  Open the {{{/Library/Tomcat/conf/tomcat-users.xml}}} file with a plain text editor. The default Tomcat installation only has the basic roles and users set up.
  
@@ -93, +77 @@

  
  In this case a role, a user and password have been set up with the name ''tomcat''. You can change this later.
  
- '''Step 5: Reboot'''
- 
- Reboot (or login again, at least). This sets up the environment and cleans out any extras you still have running.  It sets up {{{JAVA_HOME}}} as well.
- 
- '''Step 6: Start Tomcat'''
+ '''Step 4: Start Tomcat'''
  
  To start Tomcat, open a shell command prompt (using, for instance, the Terminal application).
  
@@ -111, +91 @@

  
  Any file in this directory ending in {{{.sh}}} can be executed in the terminal by putting a period and a slash before the file name (eg: {{{startup.sh}}}).  The following example executes the tomcat startup script:
  {{{
- ./startup.sh
+ ./startup.sh && tail -f ../logs/catalina.out
  }}}
  Terminal should display four lines looking something like this:
  {{{
@@ -121, +101 @@

  Using JAVA_HOME:       /Library/Java/Home
  Users-Computer:/library/tomcat/bin user$ 
  }}}
- Wait about 30 seconds.
  
  There are some notes and a couple of Preference Panes for automating the starting and stopping of Tomcat. After trying them all on five different computers - this is the simplest!
  
- '''Step 7: Test installation'''
+ '''Step 5: Test installation'''
  Open a browser window, and enter http://127.0.0.1:8080 - the default Tomcat page should open.
  
  If you click the ''Tomcat Administrator'' or ''Tomcat Manager'' links in the upper left hand of the default Tomcat page, you will be asked for a user name and password.
@@ -146, +125 @@

  - I did not need to set any environment variables (JAVA_HOME). 
  
  - But I did need to fix vital file permissions in the downloaded Tomcat folder.
+ 
+ === Also Updated in 2010 ===
+ By Pid: I removed some of the original statements about setting JAVA_HOME as they did not match my experience of installing Tomcat on OS X.
+ It's also certainly overkill to install an application just to be able to set an environment variable.
+ 
  
  ==== (1) Upgrade to Mac OS X 10.4.6 ====
  - I do not know if 10.4.6 is required, but it sure made an easy Tomcat install.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org