Tomcat configuration and installation methods-Installation and decompression

Source: Internet
Author: User

Tomcat has two installation methods:

1. Download the installation version and click "Next". The installation is successful. Set the environment variable

Tomcat_home your installation directory

Catalina_home your installation directory

This is the simplest installation method. If there is no error, you can directly OK. Then you can download the administration Web application on the official website,

Directly decompress the package to your installation directory.

2. Download and decompress the decompressed version in what you think is appropriate.

1. Modify the bin/startup. BAT file:
Add the following two rows before the first row --
Set java_home = (JDK directory)
Set catalina_home = (Tomcat directory after decompression)
If you need to use shutdown. BAT to shut down the server, add two lines as shown above.
In this way, you can run startup. BAT to run the server and shutdown. BAT to shut down the server.

2. Add tomcat to the service
1. Modify service. bat in the bin directory:
Add the following code:
-----------------------------------------------------------------------------
Rem adds the following row
Set catalina_home = (Tomcat directory after decompression)
If REM has never installed tomcat, or make sure that services. msc starts the Service Manager to check that there is no Apache Tomcat System Service,

Now you can go to step 2 of REM. Otherwise, continue.
Rem modifies the following lines according to the description.
Set SERVICE_NAME = tomcat5
In the above line of REM, tomcat5 is changed to the service name you need. This will be the name of the service that will be operated later using net start/stop.
Set pr_displayname = Apache Tomcat
In the above line of REM, change Apache Tomcat to the display service name you need. This will be displayed in the Service Manager.
Set pr_description = Apache Tomcat server-http://jakarta.apache.org/tomcat
It doesn't matter if this line of REM is changed. It is a service description. Let's decide based on your preferences.
-----------------------------------------------------------------------------
(This step can be directly added to the Windows service without modification. I am using tomcat5.5)
2. Run cmd to open the console, enter the Tomat directory/bin folder, and enter the following command to run.
Service. Bat install
Program prompt: the service 'tomcat 5 (or SERVICE_NAME after you modify one) 'has been installed
It indicates that the Tomcat service has been installed successfully.
By the way, running service. Bat remove can remove the service.
3. Here, the service is successfully added and services. MSC is run. You can see the added service. By default, the service runs manually,

In its properties, change the Startup Type to "automatic", and Tomcat will be started in the background after the machine starts.

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.