apache-tomcat installation and configuration picture tutorial

This article takes the apache-tomcat-9.0.0.M15 version as an example to demonstrate the installation process of tomcat in the Windows environment.

1. Download tomcat

Log in to the apache-tomcat official website: http://tomcat.apache.org/download-90.cgi

Click on the link above to see the following image:

The red box in the figure is the version of Tomcat with different version numbers and different usage methods. Download different versions according to your own needs. Here I choose the free installation version in Tomcat9, which is the Archives version.

2. Install Tomcat

For the downloaded version, just run the exe file directly. For specific steps, please refer to this tutorial: http://www.9553.com/soft/43454.htm . For the installation-free version, first unzip the downloaded file and there will be a folder named apache-tomcat-9.0.0.M15, put this folder in the directory you specify, here I put it in D:\Program Files\Tomcat directory.

After the above preparations are done, the next step is to install. If you have installed jdk on your computer before, then proceed directly to the next step. If not, please Baidu how to install jdk by yourself.

Step 1: Press win+r to bring up the window and enter cmd. After running cmd, enter the java -version command to test. If it is configured, it will be displayed as shown in the figure:

Step 2: Switch the cmd directory to the bin folder of the previous Tomcat installation-free package, mine is in: D:\Program Files\Tomcat\apache-tomcat-9.0.0.M15\bin, enter in the cmd window cd D:\Program Files\Tomcat\apache-tomcat-9.0.0.M15\bin, press Enter, it shows the following:

Step 3: Then enter service.bat install to install the service (in fact, you can directly find the service.bat file in the folder, double-click to run it, but I follow this process, and it feels very convenient), automatic Help you configure the tomcat environment variables. After the installation is correct, the result is as follows:

At this point, Tomcat is installed.

3. Start Tomcat

There are four ways to start tomcat:

 

1. In the cmd window, set the directory to the bin folder, then enter startup.bat and press Enter. Run tomcat in batches (the advantage of this is that you can see the running status, the database appears, and the code reports errors. Recommended)

2. Run cmd as an administrator to run the net start tomcat9 command (9 is the version number)

3. Run through the service in the task manager, win+r, then enter services.msc, and press Enter. The following form appears, then double-click Apache Tomcat 9.0 Tomcat9.

After double-clicking, the following form will pop up, and then click Start to start Tomcat.

4. Double-click tomcat9w.exe in the bin directory, a dialog box will pop up and click Confirm. Finally, the following window will pop up, and click start to run Tomcat.

Verify that Tomcat is successfully started : After starting Tomacat, open the browser, enter http://localhost:8080/ in the address bar, and then the following web page appears.

4. Close Tomcat

 

Close tomcat, corresponding to the method of starting Tomcat, there are the following three:

 

1. In the cmd window, set the directory to the bin folder, then enter shutdown.bat and press Enter.

2. Run the service in the task manager, win+r, then enter services.msc and press Enter. The following form appears, then double-click Apache Tomcat 9.0 Tomcat9.

After double-clicking, the following form will pop up, and then click Stop to close Tomcat.

3. Double-click tomcat9w.exe in the bin directory, a dialog box will pop up and click OK. Finally, the following form will pop up, and click start to run Tomcat.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325627767&siteId=291194637