Install and configure Tomcat 7 in Ubuntu

Source: Internet
Author: User

Like the previous software, Tomcat is also developed by Java. Therefore, JDK must be installed before installation.

You can go to the http://tomcat.apache.org/download-70.cgi to download the latest tomcat.

I downloaded a apache-tomcat-7.0.5.tar.gz.

Installation:

1. First, move apache-tomcat-7.0.5.tar.gz to the/OPT directory and decompress it:

1
2
3
Sudo CD apache-tomcat-7.0.5.tar.gz/OPT

Sudo tar zxvf apache-tomcat-7.0.5.tar.gz

2. Then, CD to the/OPT directory, We can rename the folder (for convenience in the future ):

1
Sudo mv apache-Tomcat-7.0.5 tomcat7


3. CD to/opt/tomcat7/bin, edit the Catalina. Sh file, and insert the following code into the file (insert to '#' comment end, where the body starts ):

1
2
3
Java_home =/opt/jdk1.6.0 _ 22 // <-- depends on the JDK installation directory.

Java_opts = "-server-xms512m-xmx1024m-XX: permsize = 600 m-XX: maxpermsize = 600 m-DCOM. Sun. Management. jmxremote"

4. Save and close. In this way, Tomcat 7 is basically installed. Port 8080 by default. You can change 8080 to another port in server. xml under the conf directory.

CD to/opt/tomcat7/bin and run:

1
Sudo./startup. Sh

If:

1
2
3
4
5
6
7
8
9
using catalina_base: /opt/tomcat7
using catalina_home: /opt/tomcat7
using catalina_tmpdir: /opt/tomcat7/temp
using jre_home: /opt/jdk1.6.0 _ 22
using classpath: /opt/tomcat7/bin/Bootstrap. jar:/opt/tomcat7/bin/tomcat-juli.jar

It should have been enabled successfully. You can access the local webpage for testing:

Http: // 127.0.0.1: 8080/

In this way, Tomcat 7 will be installed under your Ubuntu! Pai_^

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.