TOMCAT7 installation configuration for Ubuntu

Source: Internet
Author: User

First, environmental description:

Operating system: Ubuntu 12.04.2 LTS

tomcat:apache-tomcat-7.0.52

Second, download

: http://tomcat.apache.org/

The download here is apache-tomcat-7.0.52.tar.gz.

Three, installation configuration

I downloaded this download folder in the current user after it is completed. Go to download folder:

~$ cd ~/Download
Unzip the downloaded compressed package:

~$ TAR-ZXVF apache-tomcat-7.0.52.tar.gz
To rename an extract file:

~$ MV apache-tomcat-7.0.52 TOMCAT7
To move the Tomcat7 folder to/usr/local/:

~$ sudo mv tomcat7/usr/local/
Set Environment variables:

~$ sudo gedit/etc/profile
At the bottom, add:

#set Tomcat Environment
Catalina_home=/usr/local/tomcat7
Export Catalina_home
Save exit.

Go to the Tomcat7 folder:

~$ CD/USR/LOCAL/TOMCAT7
Edit catalina.sh File:

~$ sudo gedit bin/catalina.sh
Add at the end of the document:

Catalina_home=/usr/local/tomcat7
Java_home=/usr/local/java/jdk1.7.0_25
which Java_home is the installed JDK path, and Catalina_home is the installation path for Tomcat.

To start Tomcat:

~$ sudo./bin/startup.sh
If the following is displayed without any exceptions, the startup succeeds:

Using catalina_base:/USR/LOCAL/TOMCAT7
Using Catalina_home:/USR/LOCAL/TOMCAT7
Using Catalina_tmpdir:/usr/local/tomcat7/temp
Using Jre_home:/usr/local/java/jdk1.7.0_25
Using CLASSPATH:/usr/local/tomcat7/bin/bootstrap.jar:/usr/local/tomcat7/bin/tomcat-juli.jar
Tomcat started.
Stop Tomcat:

~$ sudo./bin/shutdown.sh
Iv. Installation of Tomcat services

To install the Tomcat service:

~$ sudo cp bin/catalina.sh/etc/init.d/tomcat
View Services:

~$ sudo service tomcat status
Lists a bunch of operation options, which means that the service is installed properly.

To start Tomcat through a service:

~$ sudo service tomcat start
Browser Access http://localhost:8080/tests whether the installation configuration was successful.

TOMCAT7 installation configuration for Ubuntu

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.