It programmer development must-all kinds of resources download list, the most complete IT resources in history, personal collection summary.
can be used. Please follow the procedure in everyone.
However, more than two, you will also change the port number.
1 Download Tomcat's compression pack (not the one that is installed, which can be used for direct decompression)
Download Address: http://tomcat.apache.org/download-55.cgi
Download a good filename is: apache-tomcat-5.5.23.zip
2 decompression. I unpacked it to C:\.
C:\apache-tomcat-5.5.23-1,c:\apache-tomcat-5.5.23-2, respectively.
3 Modifying any one of the configuration files
Like Apache-tomcat-5.5.23-1,
C:\apache-tomcat-5.5.23-1\conf\server.xml, open with Notepad or something.
Modify 3 Places
First:
<server port= "9005" shutdown= "shutdown" >----it turns out to be 8005.
Second
<connector port= "9080" maxhttpheadersize= "8192"----it turns out to be 8080.
The third <connector port= "9009" enablelookups= "false" redirectport= "8443" protocol= "ajp/1.3"/>---Turns out to be 8009.
and then save
4 Open the first Tomcat
Run-cmd
Set two environment variables: java_home (pointing to JDK) and catalina_home (pointing to the Tomcat directory)
At the command line: set Java_home=c:\program files\java\jdk1.5.0_11
Set Catalina_home=c:\apache-tomcat-5.5.23-1
Can run Tomcat, command: C:\apache-tomcat-5.5.23-1\bin\startup.bat
(Close can use C:\apache-tomcat-5.5.23-1\bin\shutdown.bat)
4 Start a second tomcat
Run-cmd (another command window is open)
Or do you want to set two environment variables: java_home (pointing to JDK) and catalina_home (pointing to the Tomcat directory)
At the command line: set Java_home=c:\program files\java\jdk1.5.0_11
Set Catalina_home=c:\apache-tomcat-5.5.23-2 (note the Tomcat directory I pointed to another)
Can run Tomcat, command: C:\apache-tomcat-5.5.23-2\bin\startup.bat Note is also another--5.5.23-2)
(Close can use C:\apache-tomcat-5.5.23-2\bin\shutdown.bat) (note also another--5.5.23-2)
Complete
Note:
Possible errors:
1 command-line hint: The CATALINA_HOME environment variable is not defined correctly
This environment variable are needed to run this program
translation: this Catalina_ The home environment variable is not correctly defined
This program needs to be run by this environment variable
to resolve: Set Catalina_home with my top set command
2 Command prompt: Neither the java_home nor the JRE_HOME environment variable is defined
At least one of these environment variable are needed to run this program
Translation: Java_home or jre_home environment variable any one is undefined
This program needs at least one environment variable to run (both)
Workaround: Set Java_home with my top set command
3 Command prompt: The JAVA_HOME environment variable is not defined correctly
This environment variable are needed to run this program
Nb:java_home should point to a JDK not a JRE
Translation: Java_home environment variables are not properly defined
This program requires this environment variable to run
Java_home should point to JDK rather than JRE
Workaround: Set Java_home with my top set command, and be sure to point to the JDK directory
4 about the modified port number: As long as it is not a common port number, do not set the common port number
The bottom is more common, do not set these on the line of basic 9,000 more no one uses
Service Name Port number/protocol [alias] #注释
Ftp-data 20/tcp #FTP, data
FTP 21/tcp #FTP. Control
Telnet 23/tcp
SMTP 25/tcp mail #Simple mail Transfer Protocol
Time 37/tcp Timserver
Time 37/UDP Timserver
Domain 53/tcp #Domain Name Server
Domain 53/udp #Domain Name Server
TFTP 69/udp #Trivial File Transfer
Gopher 70/TCP
HTTP 80/tcp www www-http #World Wide Web
POP3 110/tcp #Post Office protocol-version 3
NNTP 119/tcp Usenet #Network News Transfer Protocol
Netbios-ns 137/tcp nbname #NETBIOS Name Service
Netbios-ns 137/udp nbname #NETBIOS Name Service
NETBIOS-DGM 138/udp nbdatagram #NETBIOS Datagram Service
NETBIOS-SSN 139/tcp nbsession #NETBIOS session Service
IMAP 143/TCP IMAP4 #Internet message Access Protocol
SNMP 161/udp #SNMP
Snmptrap 162/udp snmp-trap #SNMP Trap
IRC 194/tcp #Internet Relay Chat Protocol
IPX 213/UDP #IPX over IP
LDAP 389/tcp #Lightweight Directory Access Protocol
HTTPS 443/tcp mcom
HTTPS 443/UDP mcom
UUCP 540/tcp UUCPD
Ldaps 636/tcp Sldap #LDAP over Tls/ssl
Doom 666/tcp #Doom Id Software
Doom 666/udp #Doom Id Software
Phone 1167/UDP #Conference Calling
Ms-sql-s 1433/tcp #Microsoft-sql-server
Ms-sql-s 1433/udp #Microsoft-sql-server
Ms-sql-m 1434/tcp #Microsoft-sql-monitor
Ms-sql-m 1434/udp #Microsoft-sql-monitor
WINS 1512/tcp #Microsoft Windows Internet Name Service
WINS 1512/udp #Microsoft Windows Internet Name Service
L2TP 1701/udp #Layer Two Tunneling Protocol
PPTP 1723/tcp #Point-to-point tunnelling Protocol
RADIUS 1812/udp #RADIUS Authentication protocol
RADACCT 1813/udp #RADIUS Accounting protocol
NFSD 2049/udp NFS #NFS Server
knetd 2053/tcp #Kerberos De-multiplexor
Mans 9535/tcp #Remote man Server