One: JDK configuration
Install Jdk-1_5_0_06.exe, all options remain the same during the installation, and the last configuration
Environment variables for JDK:
Right-click on My Computer-> "Properties"-> "Advanced"-> "Environment variable (N)".
1. New system variable Java_home:c:\program files\java\jdk1.5.0_06;
2. New system variable classpath:.; %java_home%\lib; (Note: The point number indicates the current directory and cannot be omitted)
3. Add the following in front of the value of the system variable path:%java_home%\bin; (Note: This semicolon cannot be omitted) here, the JDK is installed.
(Note: If you later install an integrated development environment such as Eclipse, Borland JBuilder, JCreator, IntelliJ idea, ide,integrated Development), You should compile a simple HelloWorld program in the IDE to ensure that the IDE recognizes the location of the JDK. )
Two: Tomcat configuration
Install Tomcat first download the compact version, with the advantage of uncompressed version: A machine can use multiple tomcat
Right-click on My Computer-> "Properties"-> "Advanced"-> "Environment variable (N)".
1: New system variable Catalina_home:d:\tomcat
2: Add after the value of the system variable classpath:%catalina_home%\common\lib;
3: In the value of the system variable path "%JAVA_HOME%\BIN;" After adding the following:%catalina_home%\bin; Here, tomcat installation is complete.
After you have completed the one or two-step setup, the values for each system variable are as follows:
Java_home:c:\program files\java\jdk1.5.0_06
Catalina_home:d:\tomcat
CLASSPATH:.; %java_home%\lib;%catalina_home%\common\lib;
Path:%java_home%\bin;%catalina_home%\bin;%systemroot%\system32 .....
Three: Run multiple tomcat on the same machine (in two cases)
The first step: the first Tomcat path is D:\TOMCAT5, and the second Tomcat path is D:\tomcat5_second.
Step two: With the first Tomcat as the standard configuration, only the second Tomcat is modified below.
D:\tomcat5_second\conf under the Server.xml file, modify three places:
1, modify the HTTP port number, the Tomcat's port number modified to not have other programs occupy the port, in advance, the cmd command "Netstat-ano" to view the port already used.
<connector port= "8000" protocol= "http/1.1" connectiontimeout= "20000"
Redirectport= "8443" uriencoding= "UTF-8"/>
2, modify shutdown port number <server port= "8006" shutdown= "shutdown" >----tomcat default is 8005
3, modify the "8009" Port number <connector port= "9009" protocol= "ajp/1.3" redirectport= "8443"/>----tomcat default is 8009
Step three: Create a new catalina_home2 with the value of the second Tomcat directory D:\tomcat_second. Finally, the Catalina_ in the contents of the bulk execution file in the Bin directory under the second Tomcat directory Home is replaced with catalina_home2.