Introduction to the ZIP version Tomcat configuration novice

Source: Internet
Author: User
Tags net variables version variable zip tomcat tomcat server apache tomcat

54powerman (54powerman@163.com)

One configuration jdk
1. Download JDK
After downloading, decompression, assuming the c:\jdk1_4, to ensure that the bin directory in this directory, the following java_home that directory c:\jdk1_4.
2. Configure System Variables
(1) Right click on "My Computer", select "Properties"-"Advanced", and click "Environment variables".
(2) in the "System Variables" box, click the "New" button, "Variable name" fill "Java_home", the value of the variable to fill in the JDK after the directory.
Continue adding Classpath variable value ".; %java_home%\lib\tool.jar;%java_home%\lib\rt.jar; "
(3) Click on the "New" button under the "User variable" box, "the variable name" fills in "PATH", "The variable Value" fills in the%path%;%java_home%\bin;

Two configuration Tomcat
1, download the Tomcat zip compression package, decompression.
2, modify the Startup.bat file:
Add the following two lines before the first line-
SET JAVA_HOME=JDK Directory
SET catalina_home= The directory of Tomcat or%cd% before decompression
If you need to use Shutdown.bat to shut down the server, add two lines to it.
3, so, run Startup.bat can run the server, run Shutdown.bat can shut down the server.

Three to join the Tomcat service
1, modify the bin directory in the Service.bat:
REM Add the following line
Set catalina_home=%cd%
If Tomcat has never been installed, or if Services.msc starts service Manager to check that there is no Apache Tomcat service, you can go to step two. Or keep going down--
REM modifies the following lines according to the description
Set SERVICE_NAME=TOMCAT5
REM on the line above, TOMCAT5 changes to the service name you need, and this will be the service name that you use to operate with net Start/stop.
Set Pr_displayname=apache Tomcat
REM on the line above, Apache Tomcat is changed to the display service name you need, which is displayed in the service Manager.
Set Pr_description=apache Tomcat Server-Http://jakarta.apache.org/tomcat
REM This line change does not matter, is the service description, according to own preference decides.
2, run CMD Open the console, into the Tomat directory/bin folder, enter the following command to run.
Service.bat Install
Program tip: The Service ' TOMCAT5 (or you modify a post service_name) ' has been installed
Description Service Tomcat has been successfully installed.
By the way, running Service.bat Remove can remove the service.
3, here, the service added successfully, run services.msc, you can see the added service, the default state that the service is manually run, in his properties, the startup type changed to "Automatic", after the machine started Tomcat in the background started.

Command for four console control services
Start a service
NET Start service Name
Turn off services
NET stop service Name
Note:
1 This service name can be service_name, or it can be pr_displayname;
2 If the service name contains spaces or Chinese, enclose the service name in Half-width double quotes.

Finally, I wish the first time configuration smoothly.



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.