[Download, installation, startup, various problem endings] of Tomcat8.5

This article is written based on the pits I have stepped on.
If it solves your problem, please like, bookmark and comment.

Download of Tomcat8.5

下载的地址:https://tomcat.apache.org/download-80.cgi
insert image description here

Install

insert image description here
In fact, the program at this time has been installed, but the Tomcat8.5 server has not been installed (will be described below), it is the format of such a folder. Unlike QQ there is a .exefile to install. We will move this folder to the location you want.

Configuration Environment

insert image description here
insert image description here
insert image description here
insert image description here
The path of the above environment configuration is configured according to your own specific path.

Server installation

用管理员身份打开cmd,进入安装tomcat的bin目录下输入service.bat install
insert image description here
The above picture shows that the installation is successful.

run the test

Method 1: under the bin folder and
insert image description here
then input in the browser: http://localhost:8080/
insert image description here
the above picture is the interface after success.

Problem: The start is closed halfway through, and it has not been opened.

solution: 删除Tomcat服务器再次安装, bin目录下打开cmd
insert image description here
service.bat remove 移除tomcat服务
insert image description here
service.bat install 再次安装服务

If the above method does not work, then try the second solution.

Method 2: Find the shutdown.bat file and shutdown.bat in the bin folder
insert image description here
shutdown.bat点击运行,作用是,关闭计算机上可能已开启的Tomcat相关服务,以防占去8080端口
shutdup.bat点击运行,作用是,开启Tomcat服务

So we first shut down the service, and then start the service. click firstshutdown.bat再shutdup.bat

See what happens at this point http://localhost:8080/, if not.

Just inside the shutdown.batand shutdup.batfile both add:
SET JAVA_HOME=D:\IntelliJ IDEA Community Edition 2021.3.3\jbr
SET TOMCAT_HOME=D:\apache-tomcat-8.5.77-windows-x64\apache-tomcat-8.5.77

Note: First make it into a txt file, add it and save it, and then change it back to bat, otherwise it will pass by in a flash or it will not be changed.
Pay special attention to the fact that the things added above are configured according to the actual path of your own file, do not copy directly, because the location of each person's file may be different.

The first one added above is the path to the JDK environment, because our Tomcat needs the JAVA environment.
The second is the path to the Tomcat folder.

After the above is done, click shutdup.bat
insert image description here
at this time and it is done, and the website can be accessed. The reason for the garbled characters is that the encoding is different, so don't worry about this.

Guess you like

Origin blog.csdn.net/qq_46527915/article/details/123810224