Linux installation TOMCAT7

Source: Internet
Author: User

*

1,sudo su switch to root user

2,uname-a Viewing the system version

3,apt-get Install TOMCAT7, if you can find the source, you can download the installation

There may be other dependencies, resulting in failure, you can follow the prompts to download the other, after the installation, TOMCAT7 automatically registered the service

Can be started with service TOMCAT7 start

4, how does Apt-get know where to get the resources?

Cat/etc/apt/sources.list can be viewed,

Under the version is tmcat7.0.28, I would like to re-update to tomcat7.0.56, the results can not find the version, guess the source is not found, in the Sources.list file added another path, also cannot, temporarily discard

5,dpkg-s TOMCAT7

You can view the specific resources for this package TOMCAT7

================

If you install manually, you need to download Deb, but how to install it, not very clear

===============

TOMCAT7 after installation, it is best to change the configuration file to optimize, for example

1,server.xml

<!--A "Connector" using the shared thread pool -       <ConnectorExecutor= "Tomcatthreadpool"Port= "8888"Protocol= "http/1.1"ConnectionTimeout= "30000"enablelookups= "false"uriencoding= "UTF-8"Acceptcount= "the"Redirectport= "8443" />

Acceptcount

The last two parameters have the following meanings:

maxthreads: The maximum number of threads that Tomcat will start, that is, the number of simultaneous tasks, with a default value of 200

Acceptcount: When the number of threads started by Tomcat reaches maximum, the number of requests queued is accepted, the default value is 100

How these two values work, see the following three scenarios

Scenario 1: Accept a request when the number of threads that Tomcat started does not arrive maxthreads,tomcat will start a thread to process the request.

Case 2: Accept a request, at which time the number of threads that Tomcat started has reached Maxthreads,tomcat will put this request into the waiting queue, waiting for the idle thread.

Scenario 3: When a request is accepted, the number of threads that Tomcat started has reached MaxThreads, and the number of requests waiting in the queue has reached Acceptcount, and Tomcat rejects the request directly, returning connection refused

===============================

2,VIM/ETC/INIT.D/TOMCAT7 file,

In SET-E

Add Ulimit-n 10240 below

=======

The Ulimit-n command allows you to view the maximum number of open file descriptors in a Linux system, the default value is 1024, which is small for a busy server, so it is necessary to reset the maximum number of open file descriptors in the Linux system.

==========

To put it simply, expand the resources that Tomcat can use in Linux.

*

Linux installation TOMCAT7

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.