Ubuntu 12.04 Setup Configure Tomcat 7.0.40Tomcat server

Source: Internet
Author: User
Tags exit tomcat

Because of a version problem on the source, there is no use of the automatic installation package on the source, as usual, Tomcat 7.0.40 core download Address: http://mirror.bit.edu.cn/apache/tomcat/tomcat-7/v7.0.40/bin/ Apache-tomcat-7.0.40.tar.gz

Put in the current login user root: ~

1, is still decompression

Tar–xzf apache-tomcat-7.0.40.tar.gz

Get apache-tomcat-7.0.40 Folder

2, change a name, or knock on the egg pain:

MV apache-tomcat-7.0.40 Tomcat

3, into the/usr/local/

sudo mv tomcat/usr/local/

4, into the/usr/local/tomcat

Cd/usr/local/tomcat

5, change the user (safety first)

sudo chown-r root.

sudo chgrp-r root.

6. Add environment variable

sudo su-

Vi/etc/profile

Bottom add:

Catalina_home=/usr/local/tomcat

Export Catalina_home

Save exit

Refreshing variables

Source/etc/profile

7, into the $catalina_home/bin

CD $CATALINA _home/bin

8. Modify Catalina.sh

VI catalina.sh, find

# OS specific support. $var _must_ is set to either true or false.

In this line, define Catalina_home and Java_home again:

Catalina_home=/usr/local/tomcat

Java_home=/usr/local/java/jdk1.7.0_21

Save exit

9, Exit root login, and try to start Tomcat

Logout

sudo./bin/startup.sh

If the following and no exceptions are displayed, the start succeeds:

Using catalina_base:/usr/local/tomcat

Using Catalina_home:/usr/local/tomcat

Using Catalina_tmpdir:/usr/local/tomcat/temp

Using Jre_home:/usr/local/java/jdk1.7.0_21

Using CLASSPATH:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar

10, stop Tomcat:sudo./bin/shutdown.sh

11. Install Tomcat Service:

sudo cp bin/catalina.sh/etc/init.d/tomcat

To view services:

sudo service tomcat status

Lists a bunch of action options that indicate that the service is installed properly.

12, let Tomcat boot

sudo update-rc.d–f tomcat defaults

13, through the service to start a try

sudo service tomcat start

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.