First, deploy and start the Tomcat server
Tomcat: open source Servlet container.
- Unzip apache-tomcat-6.0.16.zip to a non-Chinese directory
- Configuring an environment variable. Java_home (root directory of the JDK installation) or jre_home
- By startup.bat under double-click apache-tomcat-6.0.16 \ bin directory, start the server
- You can enter localhost in the browser: 8080 to test Tomcat installation is correct.
If you have already started a Tomcat application, if more start with a Tomcat application will throw an exception: java.net.BindException: Address already in use: JVM_Bind: 8080 because the port has been occupied
by modifying the server.xml file configuration information to modify the port number Tomcat server:
<Connector port = "8989" = Protocol "the HTTP / 1.1"
connectionTimeout = "20000"
the redirectPort = "8443" /> the value of the port to the other port number.
Second, in order Tomcat server can start in any directory
to D: \ \ bin Add apache-tomcat-6.0.16 to the next path, after successfully added, if start the Tomcat server in any directory, there will be tips:
The CATALINA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
Note: This requires setting environment variables CATALINA_HOME
Third, set the CATALINA_HOME environment variable
By reading startup.bat batch file, we can see there is a bin directory under CATALINA_HOME environment variable,
and there are a catalina.bat bin directory file, can be seen CATALINA_HOME points should be installed Tomcat root directory, so the Tomcat root directory set CATALINA_HOME environment variable.
at this time, namely by startup.bat in any directory, shutdown.bat startup, shutdown Tomcat server.
Fourth, continue reading startup.bat file found start tomcat server is catalina.bat file
in the command line window directly catalina, tips are as follows:
Commands:
Debug Start Catalina in A Debugger
Debug Debug Catalina with the -security A Security Manager
JPDA Start Start an under JPDA Debugger Catalina
RUN Start Current window at The Catalina in
RUN Start in the -security at The Current Security Manager window with
Start Start Catalina in A separate window
Start in the -security Start with Security Manager A separate window
STOP Stop Catalina
Version Version of the What are you Tomcat ? running
catalina like optional parameters on the command.
RUN: start the server in catalina same command line window.
start: open a new window to start the server
stop: shut down the server.