The download, installation and configuration of Tomcat (the latest detailed tutorial in 2023) is here~

Here we take Tomcat 9.0.74, 64-bit operating system as an example:

Table of contents

1. Check whether your computer has installed JDK

 2. Download and install Tomcat server

 3. Configure Tomcat environment variables

4. Test whether the environment variable is configured successfully

 5. Start Tomca


1. Check whether your computer has installed JDK

To install the Tomcat server, first install and configure the JDK:

1. Check whether jdk has been installed on your computer: win+R and press Enter--type cmd--enter java, javac, java -version commands in the console:

java
javac
java -version

 

  2. The above means have been installed, if not installed, you can refer to the Java development environment installation tutorial (the latest detailed graphic tutorial in 2023)_zbvcliwenjing's blog-CSDN blog

 2. Download and install Tomcat server

1. First Baidu search tomcat official website, click the first one to enter the download address (Tomcat official website) apache tomcat project - Apache Tomcat® - Welcome!

2. Click the 64-bit Windows zip to download

3. Unzip the downloaded zip file to a specified folder, for example: D:\software\tomcat90, the directory should not contain Chinese (it is recommended not to unzip to the C drive)

 3. Configure Tomcat environment variables

The environment variable configuration of Tomcat is almost the same as the environment variable configuration of JDK, just modify the variable name and corresponding path, the specific operation is as follows:

1. Right click on This Computer - Properties

 2. Click Advanced System Settings--Advanced--Ring Variables (N)...

 3. Find the new one under the system variable, fill in the variable name: CATALINA_HOME, variable value: D:\software\tomcat90\apache-tomcat-9.0.74 (that is, the installation path of Tomcat)

4. Find the variable name Path in the system variables--click Path--Edit--New--enter "%CATALINA_HOME%\bin"--OK--OK--OK

 5. Open the bin directory under the Tomcat installation directory: D:\software\tomcat90\apache-tomcat-9.0.74\bin Find the corresponding three files, open and modify the shutdown.bat and startup.bat files with Notepad, respectively Type in front of the first line of the two files

SET JAVA_HOME = D:\Java\jdk-19 ==> installed JDK directory

SET CATALINA_HOME= D:\software\tomcat90\apache-tomcat-9.0.74 ==> installed Tomcat directory

Save and close

4. Test whether the environment variable is configured successfully

1. Click the "Start" button in the lower left corner of the screen -- search for the command prompt -- right click to run as an administrator (enter as an administrator to prevent permission problems) -- enter cmd and press Enter to enter the command line window -- enter In the bin directory of Tomcat, enter service.bat install [service name, the default name is Tomcat9 in the configuration file] to install the window service. I have already installed this, and the window service already exists, so the error is displayed. If The service 'Tomcat9' has appeared been installed. indicates that the installation service is successful!

 5. Start Tomcat

We can start it in the window service, the steps are as follows:

 

Supongo que te gusta

Origin blog.csdn.net/m0_65065082/article/details/130301667
Recomendado
Clasificación