Detailed tutorial on installing Tomcat server and configuring environment variables on Win10 (picture and text)

Detailed tutorial on installing Tomcat server and configuring environment variables on Win10 (picture and text)

Tomcat server is a free and open source Web application server. It is a lightweight application server and is widely used in small and medium-sized systems and in situations where there are not many concurrent users. It is the first choice for developing and debugging JSP programs. This article mainly describes the installation and environment variable configuration of Tomcat server in Windows environment

Download and install JDK

To install the Tomcat server, you must first install and configure the JDK. You can refer to JDK installation and environment variable configuration.

Press Windows + R and enter cmd to enter the command line window. Check whether Java is installed correctly. The command to check is java -version

If the output is similar to the following, the installation is successful

java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

Download Tomcat compressed package

Tomcat has Tomcat7, Tomcat8 and Tomcat9. Currently, Tomcat8 is more commonly used in enterprises, so Tomcat8 is listed here.

Enter the Tomcat8 download website: Tomcat8 download website https://tomcat.apache.org/download-80.cgi

Click the corresponding version under Download on the left. Here I download the 64-bit Windows zip, which is the 64-bit Windows zip package.

Tomcat has three main installation versions

  • tar.gz: compressed package in Linux environment, no installation required
  • Windows.zip: Windows compressed package, no installation required, just unzip and use, recommended installation , and pay attention to download the corresponding compressed package according to whether your computer is a 64-bit system or a 32-bit system
  • Windows Service Installer: Windows installation package, applicable to both 32-bit and 64-bit versions of Windows

insert image description here

Unzip the Tomcat compressed package

Put the downloaded zip package in the specified location. Note: the path cannot contain Chinese characters or special characters.

My zip package is in C:\develop\Tomcat

insert image description here

Then unzip it to the current folder.

insert image description here

Tomcat Directory Structure

The directory structure after decompressing Tomcat is as follows

insert image description here

For the specific directory file functions, please refer to the Tomcat directory structure. The description is very detailed.

Start Tomcat

Double-click the startup.bat file in Tomcat's bin directory. If the following interface appears, it means that your Tomcat server has run successfully. Give yourself a thumbs up.

insert image description here

Then enter 127.0.0.1:8080 or localhost:8080 in the browser address bar to enter the Tomcat main interface

insert image description here

However, some friends may encounter various problems when starting Tomcat, such as garbled characters, port occupation, and crash after starting Tomcat startup.bat. For details, please refer to the solution of Tomcat garbled characters and port occupation.

Environment variable configuration

The environment variable configuration of Tomcat is almost the same as that of JDK, except that the variable name and the corresponding path are modified. The specific operations are as follows.

Note : If you do not often need to use Tomcat globally, I personally do not recommend setting environment variables, because it may conflict with other commands, and it is not used as much as JDK. In fact, it is also very convenient to directly enter the Tomcat directory to start it.

Right click on此電腦屬性

insert image description here

Click Advanced system settings, and then click Environment variables.

insert image description here

Create a new variable name "CATALINA_HOME", variable value "C:\develop\Tomcat\apache-tomcat-8.5.47" (that is, the installation path of Tomcat)

insert image description here

Find the variable name "Path" in the system variables, click Edit, then click "New", then enter "%CATALINA_HOME%\bin", click "OK", and then click "OK".

insert image description here

Test whether the environment variables are configured successfully, Windows + R and then enter cmd to enter the command line window. The command to check is startup.bat

If the output is as follows, the configuration is successful

insert image description here

Summarize

The above is a detailed tutorial (picture and text) on how to install Tomcat server and configure environment variables on Win10. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Detailed configuration of Apache2.2+Tomcat7.0 under Windows 7
  • How to configure load balancing with nginx+tomcat under Windows
  • Tomcat7.0 configuration tutorial under Win7 system
  • Tomcat server installation and configuration tutorial (win7)
  • How to install Tomcat server and configure virtual directory in Windows system
  • How to configure two or more Tomcat startups under Windows
  • How to install and configure Tomcat7.0 under window7
  • Windows Tomcat configuration complete [detailed]
  • Win10 configuration tomcat environment variables tutorial diagram

<<:  Detailed Example of Row-Level Locking in MySQL

>>:  React concurrent function experience (front-end concurrent mode)

Recommend

Detailed explanation of MySQL database index

Table of contents 1. Introduction to MySQL Index ...

Detailed explanation of the solution to Ubuntu dual system stuck when starting

Solution to Ubuntu dual system stuck when startin...

Problems encountered when updating the auto-increment primary key id in Mysql

Table of contents Why update the auto-increment i...

How to view mysql binlog (binary log)

For example, when you create a new table or updat...

Steps to configure nginx ssl to implement https access (suitable for novices)

Preface After deploying the server, I visited my ...

Implementation steps for docker deployment lnmp-wordpress

Table of contents 1. Experimental Environment 2. ...

Installation steps of Ubuntu 20.04 double pinyin input method

1. Set up Chinese input method 2. Set the double ...

CSS realizes the realization of background image screen adaptation

When making a homepage such as a login page, you ...

MySql index detailed introduction and correct use method

MySql index detailed introduction and correct use...

Several CSS3 tag shorthands (recommended)

border-radius: CSS3 rounded corners Syntax: borde...

Detailed explanation of TIMESTAMPDIFF case in MySQL

1. Syntax TIMESTAMPDIFF(unit,begin,end); Returns ...