Installation of Tomcat in Windows 10

Time:2021-3-29

Installing Tomcat on Windows platform

This article will introduce how to deploy and use Tomcat in Windows platform, and give you a quick start to use Tomcat

Introduction to Tomcat

Tomcat is a core project of the Apache Software Foundation’s Jakarta project, which is jointly developed by Apache, sun and other companies and individuals. Tomcat server is a free open source web application server. It is a lightweight application server. It is widely used in small and medium-sized systems and not many concurrent users. It is the first choice for developing and debugging JSP programs.

Of course, you can also simply think that it is an Apache plug-in that can parse JSP programs. When an Apache server is configured on a machine, you can use it to respond to HTML (an application under the standard General Markup Language) page access requests. But the problem is that Apache server can’t respond to the access request of JSP program page alone, so we need to use Tomcat plug-in to help Apache respond. Most of all, Tomcat is an extension of Apache server, but it runs independently at runtime, so when you run tomcat, it actually runs as a separate process from Apache.

  Download and install related software

Required software: JDK, Tomcat (the relevant version can be selected for their own. )

This demo uses JDK software version: jdk-8u221-windows-x64

Tomcat software version: apache-tomcat-9.0.26

  1、 Download JDK, Tomcat

1. Download JDK

JDK is the foundation of all Java applications, and all Java applications are built on it. It is a set of APIs, or Java classes. JDK is a set of things to develop java programs, Tomcat is the Java program.

Download address: https://www.oracle.com/technetwork/java/javase/downloads/index.html

Choose the corresponding software version of JDK according to your PC configuration and your application

Because this demo uses Windows system, I downloaded jdk-8u221-windows-x64.exe

2. Download Tomcat

Download address: https://tomcat.apache.org/download-90.cgi

Note: choose. Zip package for Windows version and choose Linux version tar.gz Packaged packages

2、 Install JDK

1. Install JDK

In the download directory, find the installation package you just downloaded and run the. EXE file to start your installation

Select the installation directory of JDK (note that the Chinese directory is not allowed in the directory), and the default installation path is “C:: program files \ \ Java \ \ JDK version. You can install it by default or customize it (recommended). After selection, click next. Remember the path when installing. This directory will be used later. I will choose the default directory here.

At this point, JDK has been installed

2. Configure JDK

Right click “my computer (computer) – > Properties” on the desktop and select “advanced system settings”.

In system properties, select advanced environment variables.

In the environment variables panel, find system variables and select new.

In the new system variable dialog box, enter Java in the variable name column_ Find the JDK installation path and fill in the variable value.

Then find the “classpath” variable in “system variables”, select it and click “Edit”. Some computers don’t have this variable. If you don’t, just create a new variable

Finally, find the “path” variable in “system variables”, select it and click “Edit”.

Click new, and enter “;% Java” at the end of the variable value line_ “Home% \ bin” must be in English. Then confirm. This environment variable has been configured.

Confirm and configure after application.

3. Verify whether JDK is installed successfully

Use the win + R shortcut key to open the run input CMD command and enter the doc command window

Enter “Java – version” and the following interface appears. JDK is installed successfully.

2. Install and use Tomcat

The Tomcat software package downloaded from the official website can be used without installation. Just unzip the Tomcat software package.

  

Unzipped directory

Here is a brief introduction to these directories in Tomcat Directory:

Bin: bin directory is mainly used to store Tomcat commands. There are two main categories: one is the. Sh ending (Linux command), the other is the. Bat ending (Windows command).

Conf: the conf directory is mainly used to store some configuration files of Tomcat.

The main directory used to load libcattom jar is libcattom jar.

logs:logs The directory is used to store the log files generated by Tomcat during operation.

Temp: the temp directory stores the temporary files generated by Tomcat during operation.

Webapps: the webapps directory is used to store applications. When Tomcat starts, it will load the applications in the webapps directory.

Work: the work directory is used to store the compiled files of Tomcat at runtime.

3. Now that Tomcat is deployed, let’s start the Tomcat

Use Win + R shortcut key, open run input CMD, enter doc command line interface

Find the root directory of Tomcat and copy its path

The reason is that I entered the “tomd” directory on the installation disk

Then enter “CD Tomcat installation directory / bin”

After entering the directory, you can first view the contents of the directory and enter “dir”

Input“ startup.bat ”Start Tomcat

Press enter to show that the startup is successful

Next, let’s try to access (the default port is 8080), access method: Tomcat server IP: 8080

The following interface is successful

summary

The above is a small series to introduce you to install Tomcat in Windows 10 tutorial diagram, I hope to help you, if you have any questions, please leave me a message, small series will reply to you in time. Thank you very much for your support to developer!
If you think this article is helpful to you, please reprint, please indicate the source, thank you!