IDEA configures Tomcat 8 (including Tomcat download and installation configuration)

IDEA deployment Tomcat 8

1. Download Tomcat

  1. Log in to the tomcat official website http://tomcat.apache.org/ , there is a download option in the left column, select to download the corresponding Tomcat version.
    insert image description here
    There are two formats of zip and exe in the download version, zip is the installation-free version, and exe is the installation version. Pay attention to choose the corresponding installation version according to your computer system (64-bit or 32-bit).
    Considering various reasons, I chose to download the zip version.
    insert image description here
    Unzip directly after downloading.
    2. Find bin under the directory after decompression startup.bat, and click to start Tomcat. Shut down Tomcat ( shutdown.bat).
    insert image description here

Two, Tomcat configuration environment variables

1. After the installation is complete, right-click "My Computer", click "Properties", "Advanced System Settings", and "Environment Variables".
insert image description here
2. Add two variables in the system variablesCATALINA_BASE : and CATALINA_HOME. As shown in FIG.
3. Add in the variable value of ClassPath%CATALINA_HOME%\lib\servlet-api.jar; : (Note that the semicolon is the semicolon under the English input method).
insert image description here
Mine is a newly created CLASSPATH variable. After Baidu, I found that Java can have no CLASSPATH, just pay attention to adding it to Path. However, if Tomcat is configured, CLASSPATH and PATH must be modified accordingly.
4. Add it to the Path variable %CATALINA_HOME%\bin;``%CATALINA_HOME%\lib;(note that the semicolon is in the state of the English input method).
insert image description here
5. Verification: Open cmdthe terminal and enter the command startup, as shown in the figure, that means the configuration is successful.
insert image description here

3. IDEA configures Tomcat

1. Click RunEdit Configurations
insert image description here
2. Click the "+" sign on the left, find Tomcat Server, and select Local (if there is no Tomcat Server in the directory, you can find it in the bottom 34 items more).
insert image description here
3. Click Configuration , find the Tomcat installation folder, and click OK .
insert image description here
After performing the above steps, Tomcat configuration is complete.

Reference link: https://www.cnblogs.com/weixinyu98/p/9822048.html

Guess you like

Origin blog.csdn.net/problemRecord/article/details/113806706