1, download the apache-tomcat6, URL link: Links-
1, download apache-tomcat6,
Address: http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.28/bin/
Select the Ubuntu, that is, the apache-tomcat-6.0.28.tar.gz file,
2. Copy the installation file to the/usr/local/directory and enter the command on the console,
Sudo tar-zxvf apache-tomcat-6.0.28.tar.gz,
Decompress the installation package to the apache-tomcat-6.0.28 directory,
3. Run the following command on the console: sudo gedit/usr/local/apache-tomcat-6.0.28/bin/startup. sh,
Configure the startup. sh file and add the following configuration items,
JAVA_HOME =/usr/lib/sunJVM/JDK/jdk1.6.0 _ 20
PATH = $ JAVA_HOME/bin: $ PATH
CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
TOMCAT_HOME =/usr/local/apache-tomcat-6.0.28
The JAVA_HOME and so on are shown in the Sun JDK installation article above.
Save and exit.
4. Go to the/usr/local/apache-tomcat-6.0.28/bin/directory,
Enter the following command:
Cd/usr/local/apache-tomcat-6.0.28/bin,
Sudo./startup. sh
Start the tomcat server,
If:
Using CATALINA_BASE:/usr/local/apache-tomcat-6.0.28
Using CATALINA_HOME:/usr/local/apache-tomcat-6.0.28
Using CATALINA_TMPDIR:/usr/local/apache-tomcat-6.0.28/temp
Using JRE_HOME:/usr/lib/sunJVM/JDK/jdk1.6.0 _ 20
Using CLASSPATH:/usr/local/apache-tomcat-6.0.28/bin/bootstrap. jar
The code is basically started normally. Enter http: // localhost: 8080/to check whether you can see the familiar tomcat welcome interface.
5. For other configurations, you can configure the conf/server. xml file, such as the port number,
Enter the command: sudo gedit/usr/local/apache-tomcat-6.0.28/conf/server. xml
ConnectionTimeout = "20000"
RedirectPort = "8443" URIEncoding = "UTF-8"/>
Change the listening port to 80 and add URIEncoding = "UTF-8" to support Chinese parameter passing.
The command to stop the shutdown server is:
Sudo./shutdown. sh