RUNNING.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. $Id: RUNNING.txt,v 1.1 2005/03/05 00:29:13 matt Exp $
  2. Running The Tomcat 5 Servlet/JSP Container
  3. ==========================================
  4. This subproject contains Tomcat 5, a server that implements the Servlet 2.4
  5. and JSP 2.0 specifications from the Java Community Process
  6. <http://www.jcp.org/>. In order to install and run this container, you must do
  7. the following:
  8. (0) Download and Install a Java Development Kit
  9. * Download a Java Development Kit (JDK) release (version 1.3 or later) from:
  10. http://java.sun.com/j2se/
  11. * Install the JDK according to the instructions included with the release.
  12. * Set an environment variable JAVA_HOME to the pathname of the directory
  13. into which you installed the JDK release.
  14. (1) Download and Install the Tomcat 5 Binary Distribution
  15. NOTE: As an alternative to downloading a binary distribution, you can create
  16. your own from the Tomcat source repository, as described in "BUILDING.txt".
  17. If you do this, the value to use for "${catalina.home}" will be the "dist"
  18. subdirectory of your source distribution.
  19. * Download a binary distribution of Tomcat from:
  20. http://jakarta.apache.org/site/binindex.cgi
  21. * Unpack the binary distribution into a convenient location so that the
  22. distribution resides in its own directory (conventionally named
  23. "jakarta-tomcat-5"). For the purposes of the remainder of this document,
  24. the symbolic name "$CATALINA_HOME" is used to refer to the full
  25. pathname of the release directory.
  26. (2) Start Up Tomcat 5
  27. Tomcat 5 can be started by executing the following commands:
  28. $CATALINA_HOME\bin\startup.bat (Windows)
  29. $CATALINA_HOME/bin/startup.sh (Unix)
  30. After startup, the default web applications included with Tomcat 5 will be
  31. available by visiting:
  32. http://localhost:8080/
  33. Further information about configuring and running Tomcat 5 can be found in
  34. the documentation included here, as well as on the Tomcat web site:
  35. http://jakarta.apache.org/tomcat/
  36. (3) Shut Down Tomcat 5
  37. Tomcat 5 can be shut down by executing the following command:
  38. $CATALINA_HOME\bin\shutdown (Windows)
  39. $CATALINA_HOME/bin/shutdown.sh (Unix)
  40. (4) Advanced Configuration - Multiple Tomcat 5 Instances
  41. In many circumstances, it is desirable to have a single copy of a Tomcat 5
  42. binary distribution shared among multiple users on the same server. To make
  43. this possible, you can pass a "-Dcatalina.base=$CATALINA_BASE" argument when
  44. executing the startup command (see (2)). In this
  45. "-Dcatalina.base=$CATALINA_BASE" argument, replace $CATALINA_BASE with the
  46. directory that contains the files for your 'personal' Tomcat 5 instance.
  47. When you use this "-Dcatalina.base=$CATALINA_BASE" argument, Tomcat 5 will
  48. calculate all relative references for files in the following directories based
  49. on the value of $CATALINA_BASE instead of $CATALINA_HOME :
  50. * conf - Server configuration files (including server.xml)
  51. * logs - Log and output files
  52. * shared - For classes and resources that must be shared across all web
  53. applications
  54. * webapps - Automatically loaded web applications
  55. * work - Temporary working directories for web applications
  56. * temp - Directory used by the JVM for temporary files (java.io.tmpdir)
  57. If you do not pass the "-Dcatalina.base=$CATALINA_BASE" argument to the startup command, $CATALINA_BASE will default to the same value as $CATALINA_HOME (which means that the same directory is used for all relative path resolutions).
  58. The administration and manager web applications, which are defined in the
  59. $CATALINA_BASE/conf/Catalina/localhost/admin.xml and $CATALINA_BASE/conf/Catalina/localhost/manager.xml files, will
  60. not run in that configuration, unless either:
  61. - The path specified in the docBase attribute of the Context element is made
  62. absolute, and replaced respectively by $CATALINA_HOME/server/webapps/admin
  63. and $CATALINA_HOME/server/webapps/manager
  64. - Both web applications are copied or moved to $CATALINA_BASE, and the path specified in the docBase attribute of the Context element is modified appropriately.
  65. - Both web applications are disabled by removing $CATALINA_BASE/conf/Catalina/localhost/admin.xml
  66. and $CATALINA_BASE/conf/Catalina/localhost/manager.xml
  67. (5) Troubleshooting:
  68. There are only really 3 things likely to go wrong during the stand-alone
  69. Tomcat 5 install:
  70. 1) The most common hiccup is when another web server (or any process for that
  71. matter) has laid claim to port 8080. This is the default HTTP port that
  72. Tomcat attempts to bind to at startup. To change this, open the file:
  73. $CATALINA_HOME/conf/server.xml
  74. and search for '8080'. Change it to a port that isn't in use, and is
  75. greater than 1024, as ports less than or equal to 1024 require superuser
  76. access to bind under UNIX.
  77. Restart Tomcat and you're in business. Be sure that you replace the "8080"
  78. in the URL you're using to access Tomcat. For example, if you change the
  79. port to 1977, you would request the URL http://localhost:1977/ in your browser.
  80. 2) An "out of environment space" error when running the batch files in
  81. Windows 95, 98, or ME operating systems.
  82. Right-click on the STARTUP.BAT and SHUTDOWN.BAT files. Click on
  83. "Properties", then on the "Memory" tab. For the "Initial environment" field,
  84. enter in something like 4096.
  85. After you click apply, Windows will create shortcuts which you can use to start and stop the container.
  86. 3) The 'localhost' machine isn't found. This could happen if you're behind a
  87. proxy. If that's the case, make sure the proxy configuration for your
  88. browser knows that you shouldn't be going through the proxy to access the
  89. "localhost".
  90. In Netscape, this is under Edit/Preferences -> Advanced/Proxies, and in
  91. Internet Explorer, Tools -> Internet Options -> Connections -> LAN Settings.