Install Tomcat 6 in Ubuntu10.04

Source: Internet
Author: User
1, download apache-tomcat6, address link: small 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
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.