This blog records the process of downloading and installing Tomcat. Follow the screenshot and it’s OK;
if you want to configure in IDEA after the installation is complete, see this article: Configure Tomcat in IDEA
Article Directory
1. Download
The Tomcat download link is attached: Tomcat download little by little
I choose Tomcat9 to download
Two, unzip
Just unzip it directly after downloading, the files after unzipping are as follows:
Three, the configuration of environment variables
1. Click "This computer", right click, "Properties"
2. "Advanced System Settings"
3. Modify environment variables (manually focus on)
这里给出的东西 一会下面需要用,过来复制粘贴就好了(暂时略过)
%CATALINA_HOME%\lib
%CATALINA_HOME%\lib\servlet-api.jar
%CATALINA_HOME%\lib\jsp-api.jar
Fourth, modify some files
1. In the unzipped file, find the conf folder
Open the " tomcat-users.xml " file, add the following content in the last line of the file, then save and exit:
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="admin" roles="admin-gui"/>
<user username="tomcat" password="admin" roles="manager-gui"/>
2. In the unzipped file, find the bin folder
Double-click the startup file to start Tomcat;
(The problem is coming, a bunch of garbled codes, if you don't have this problem, you can skip it directly, and see if you have the same problem)
Solution: Open the "logging.properties" file in the conf folder;
modify the content of the file as shown;
Then save and close, and restart Tomcat according to the previous step;
This starts successfully (don’t close the startup window yet)
5. Open the browser and test it
在地址栏输入http://localhost:8080 或 http://127.0.0.1:8080
(这里注意一下,先不要关闭刚才的启动窗口)
After entering the URL, the page looks like this, and it is finally ready!