Article Directory
Tomcat server is a free open source Web application server, are lightweight application server, it is not widely used in many occasions small and medium systems and concurrent user access is the preferred development and debugging JSP program. This paper describes the Windows environment Tomcat server installation and configuration environment variable
Download and install JDK
To install Tomcat server, we must first install the JDK configured, you can refer to the JDK installation and configuration environment variable
Windows + R and type cmd into the command line window to check if Java is installed correctly, check the commandjava -version
If the output like the following instructions to install success
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 archive
Tomcat has Tomcat7, Tomcat8 and Tomcat9, currently more companies use is Tomcat8, so here is the column to Tomcat8
Enter Tomcat8 download URL: Tomcat8 download site https://tomcat.apache.org/download-80.cgi
Click on the appropriate version in the left side of the Download, here I downloaded the 64-bit Windows zip, zip namely Windows 64-bit package
There are three versions of Tomcat installation
-
tar.gz: archive in the Linux environment, free installation
-
Windows.zip:Windows compressed, free installation, i.e. with the decompression, the recommended installation , bearing in mind the 64-bit or 32-bit system corresponding to the download computer is compressed according to their
-
Windows Service Installer: Windows installation package, 32-bit and 64-bit versions of Windows are applicable
Unzip Tomcat archive
The downloaded zip package into the specified location, pay attention: the path can not have Chinese characters and special
My zip bag onC:\develop\Tomcat
Then extract to the current folder can
Tomcat directory structure
After extracting the directory structure shown below Tomcat
[Pictures of foreign chains dump fails, the source station may have a security chain mechanism, it is recommended to save the picture down directly upload (img-V0ZHNnuy-1571370731355) (C: \ Users \ JourW \ Desktop \ Tomcat \ Tomcat directory structure \ Tomcat directory structure. png)]
Specific reference is the role of the catalog file Tomcat directory structure , very detailed written explanation oh
Start Tomcat
Double-click the file to run startup.bat Tomcat's bin directory, if the following screen appears, indicating that your Tomcat server has successfully run up for their own thumbs.
Then in the browser address bar 127.0.0.1:8080
, or localhost:8080
you can enter the Tomcat main interface
But some small partners will encounter a variety of problems when you start Tomcat, such as garbled, after the occupation of the port of Tomcat startup.bat after boot flash back issues, specifically refer to Tomcat FAQ Summary
Environment variable configuration
Tomcat environment variables with JDK environment variable configuration almost the same configuration, but modify variables and corresponding path names, as follows.
Note : If you do not often need to use Tomcat Global, individuals do not recommend setting environment variables, because it may conflict with other commands, and unlike the JDK was so much, in fact, directly into the Tomcat directory of the boot is also very convenient.
In 此电脑
Right属性
Click "Advanced System Settings", and then click the "Environment Variables."
New -> variable name "CATALINA_HOME", the value of the variable "C: \ develop \ Tomcat \ apache-tomcat-8.5.47" (that is, the installation path of Tomcat)
Variable names found in the system variable "Path", click Edit, then click on the "New" and enter the "% CATALINA_HOME% \ bin", click "OK" and then click "OK."
Command to test whether the configuration environment variable, Windows + R and type cmd into the command line window to check for startup.bat
If the output follows the configuration was successful