"Translate" Tomcat 6.0 installation and startup

Source: Internet
Author: User
Tags stop script

This article is from TOMCAT6 Official document: Operation manual Running.txt

There are a lot of problems that have not been noticed before, this is just learning.

series from : "Tomcat Official document Translation"

Installation of Tomcat

  1 Verify that the JRE or JDK is installed on the machine and can be viewed by entering java-version on the command line.

TOMCAT6 requires JDK or JRE in 5 or later versions.

  2 Downloads Tomcat:http://tomcat.apache.org/download-60.cgi

You can choose to download the binary installation file installer or download the compressed package directly.

It is recommended to download the Zip package directly.

If you download the installation file, the Tocmat will be installed as a service, and you need to be aware that modifying the service starts automatically. When you start, you will see a Tomcat management icon in the status bar.

  3 Configuring Environment Variables "Note that this part of the operation is not necessary!" If you start with a script, these variables will be set automatically, provided your JDK or JRE is properly installed "

3.1 First, the CATALINA_HOME environment variable should be set to the Tomcatxxx directory. If not set, the path is automatically set when it is started.

3.2 Set Java_home or Jre_home, if not set, the system will automatically search. If it is not found, the Tomcat launcher will flash back.

3.3 Set catalina_opts and java_opts to configure the relevant parameters for Tomcat and JVM.

Tomcat Start-up

There are two ways to start under Windows:

%catalina_home%%catalina_home%\bin\catalina.bat start

The *nix system can be started in the following way:


%catalina_home%\bin\catalina.sh start

Once started, it can be accessed via http://localhost:8080.

Tomcat's off

Under Windows, you can turn off the following way:

%catalina_home%%catalina_home%\bin\catalina.bat stop directly close the startup window

Under *nix, you can close it in the following way:

%catalina_home%\bin\shutdown.sh%catalina_home%\bin\catalina.sh Stop script directly in terminal
Tomcat Common failures

1 HTTP port conflicts

The problem may be that a Tomcat service has been started, and when the second one is started, the port is already occupied and an error is made.

"Solution"

Modifying port 8080 in Catalina_home/conf/server.xml

<connector connectiontimeout= "20000" port= "8080" protocol= "http/1.1" redirectport= "8443"/>

Of course, when modified, the URL of the access will also change, such as when modified to 9999, the access address becomes: http://localhost:9999

2 Locahost can't find it.

This situation may be due to a network proxy set up.

"Solution"

Modify the configuration of the agent, different browser operations may be different.

Tomcat Optional Components

Tomcat provides two components:

1 Tomcat local library: Used to connect Tomcat via HTTP and AJP.

You can disable the library by configuring Server.xml

2 Tomcat daemon: installed as a service in Windows; *nix is installed as a daemon.

Modify the name of the installer by modifying it (without trying!) )

Both components are based on the C language and are executed in the JRE, the WINODWS version of the installation package comes with both components, and the other versions need to manually download the corresponding version installation themselves.

If you have just used tomcat not to use these two components, refer to the documentation first if you use them. Other documentation Reference "1" This official document: Http://tomcat.apache.org/tomcat-6.0-doc/RUNNING.txt "2" apr/native Library user's manual: http://tomcat.apache.org /tomcat-6.0-doc/apr.html "3" HTTP Apr connection Tomcat configuration document: Http://tomcat.apache.org/tomcat-6.0-doc/config/http.html http ://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html "4" Native Library project Address: http://tomcat.apache.org/native-doc/"5" openssl:http://openssl.org/(before "Heart Bleed", can look at this more understanding under. ) "6" apr:http://apr.apache.org/"7" http server:http://httpd.apache.org/"8" Apache Commons Daemon Project:/http commons.apache.org/daemon/

Translation Tomcat 6.0 installation and startup

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.