Start Tomcat automatically at startup

Source: Internet
Author: User
Tags apache tomcat

1. Install JDK and tomcat

1. Install JDK: run the jdk-7-windows-i586.exe executable program directly. Install the program by default.

Note: The path can be another drive letter. It is not recommended that the path contain Chinese names and special symbols.

2. install Tomcat: directly decompress the downloaded file “apache-tomcat-7.0.33-windows-x86.zip "to drive C. We recommend that you change the installation path to c: \ tomcat.

NOTE: If an executable file is downloaded, double-click it to run it. By default, it is installed.

2. Configure JDK environment variables (check how to configure environment variables in step)

1. Create a variable named java_home. The variable value is c: \ Program Files \ Java \ jdk1.7.0.

2. Open Path and add the variable value: % java_home % \ bin; % java_home % \ JRE \ bin

3. Create a variable named classpath with the variable value:.; % java_home % \ Lib \ DT. jar; % java_home % \ Lib \ tools. Jar

Note:

1,. indicates the current path, % java_home % is to reference the previously specified java_home;

2. java_home indicates the JDK installation path. This path includes Lib, bin, JRE, and other folders. Tomcat and eclipse depend on this variable for running.

3. Path allows the system to recognize Java commands in any path.

4. classpath is the Java class or lib path. Only classes in classpath can be identified by Java commands.

Iii. Test JDK

Enter the javac, Java, and javadoc commands under the CMD command: the graphical interface appears, indicating that the installation is successful.

Thu, Configure Tomcat Environment Variables

1. New variable name: catalina_base; variable value: C: \ Tomcat

2. Create a variable named catalina_home. The variable value is c: \ tomcat.

3. Open Path and add the variable value: % catalina_home % \ Lib; % catalina_home % \ bin.

V.Start Tomcat

1. Method 1: run the CMD command: startup. The following dialog box is displayed, indicating that the service is successfully started.

2. method 2: Right-click "computer" on the desktop-> "manage"-> "services and applications"-> "services", find the "Apache Tomcat" Service, right click, select start, and then change the start type to "automatic"

Sat. Test Tomcat Enter localhost: 8080/in the address bar/ 7. automatically start Tomcat 1. Open the bin directory of Tomcat and find service. bat. 2. Start-> RUN cmd-> drag service. bat to the DOS window and press Enter.

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.