Getting started with Tomcat configuration in zip

Source: Internet
Author: User

54 powerman (54powerman@163.com)

1. Configure JDK
1. Download jdk
After downloading the package, decompress the package and assume it is c: jdk1_4. Make sure that the bin directory is in this directory. The following JAVA_HOME directory is c: jdk1_4.
2. Configure System Variables
(1) Right-click "my computer", select "properties"-"advanced", and click "environment variables ".
(2) In the "System variables" box, click the "new" button, enter "JAVA_HOME" for "variable name", and enter the variable value in the directory where jdk is extracted.
Add the CLASSPATH variable value ".; % JAVA_HOME % libool. jar; % JAVA_HOME % libt. jar ;"
(3) Under the "user variables" box, click the "new" button, fill in "PATH" for "variable name", and fill in % PATH % for "variable value"; % JAVA_HOME % in;
 
2. Configure tomcat (a good JSP running platform)
1. Download the Zip package of tomcat (a very useful JSP operating platform) and decompress it.
2. Modify the startup. bat file:
Add the following two rows before the first row --
SET JAVA_HOME = JDK directory
SET CATALINA_HOME = the directory of tomcat (a very useful JSP running platform) or
If you need to use shutdown. bat to shut down the server, add two lines as shown above.
3. In this way, run startup. bat to run the server, and run shutdown. bat to close the server.
 
3. Add tomcat (a good JSP running platform) to the service
1. Modify service. bat in the bin directory:
REM adds the following row
Set CATALINA_HOME = Í %
If you have never installed tomcat (a good JSP running platform), or ensure that Services. the msc startup service manager does not check apache (the most popular WEB server platform on the Unix platform) tomcat (a very useful JSP running platform) System Service, now you can go to step 2. Otherwise, continue --
REM modifies the following lines according to the description.
Set SERVICE_NAME = tomcat (a good JSP running platform) 5
In the above line of REM, tomcat (a very useful JSP running platform) 5 is changed to the service name you need. This will be the service name that will be operated later using net start/stop.
Set PR_DISPLAYNAME = apache (the most popular WEB server platform on the Unix platform) tomcat (a very useful JSP running platform)
In the above line of REM, change apache (the most popular WEB server platform on the Unix platform) tomcat (a very useful JSP running platform) to the display service name you need, this will be displayed in the Service Manager.
Set PR_DESCRIPTION = apache (the most popular WEB Server platform for Unix) tomcat (a very useful JSP operating platform) Server-http://jakarta.apache (the most popular WEB Server platform for Unix ). org/tomcat (a good JSP running platform)
It doesn't matter if this line of REM is changed. It is a service description. Let's decide based on your preferences.
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 (a good JSP running platform) 5 (or The SERVICE_NAME after you change one) has been installed
It indicates that the Service tomcat (a very useful JSP running platform) has been installed successfully.
By the way, running service. bat remove can remove the service.
3. Here, the service is successfully added and services are run. msc, you can see the added service. By default, the service runs manually. In its properties, change the Startup Type to "automatic ", after the machine is started, tomcat (a very useful JSP running platform) will be started in the background.
 
4. Console Control Service commands
Start the service
Net Start service name
Close service
Net stop service name
Note:
1. This service name can be SERVICE_NAME or PR_DISPLAYNAME;
2. if the service name contains spaces or Chinese characters, enclose the service name in double quotation marks.
 
Finally, I wish the configuration went smoothly for the first time.

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.