One: JDK configuration
Install jdk1.7.0_51, all options remain default during installation, and last configuration
Environment variables for JDK:
On the My Computer, right-click Properties, Advanced, environment variables (N).
1. New system variable java_home:c:\program files\java\jdk1.7.0_51;
2. New system variable CLASSPATH:.; %java_home%\lib; (Note: The dot number indicates the current directory, cannot be omitted)
3. Add the following in front of the value of the system variable path:%java_home%\bin; (Note: Here the semicolon cannot be omitted) here, the JDK is installed.
(Note: If you want to install an integrated development environment such as Eclipse, Borland JBuilder, JCreator, IntelliJ idea in the future (ide,integrated development environment), You should compile and run a simple HelloWorld program in the IDE to ensure that the IDE can identify the location of the JDK. )
Two: Tomcat configuration
Install Tomcat first download the compressed version, the advantage of the decompression version is: A machine can use multiple tomcat
On the My Computer, right-click Properties, Advanced, environment variables (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;" Add the following:%catalina_home%\bin; here, Tomcat is installed.
After 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: multiple tomcat running on the same machine (example of two)
Step one: The first Tomcat path is D:\TOMCAT5, and the second Tomcat path is D:\tomcat5_second.
Second step: With the first Tomcat as the standard configuration, the following only modifies the second Tomcat.
D:\tomcat5_second\conf under the Server.xml file , modify three of these locations:
1. Modify the HTTP port number to change the port number of Tomcat to one that is not occupied by other programs, and use the cmd command "Netstat-ano" to see the port already used in advance.
<connector port= "8000" protocol= "http/1.1" connectiontimeout= "20000"
Redirectport= "8443" uriencoding= "UTF-8"/>
2, modify the port number of the shutdown <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 whose value is the second Tomcat directory D:\tomcat_second. Finally, the second tomcat under the directory in the bin directory in the bulk of the file contents of the Catalina_ Home can be replaced with catalina_home2.
Note: You do not need to catalina_base this variable
JDK&TOMCAT environment variable configuration and running multiple Tomcat methods simultaneously