发布时间:2023-11-19 18:00
Tomcat官网
选择自己需要的版本,一般选择Windows 64位压缩包版本:
64-bit Windows zip (pgp, sha512)
变量名:CATALINA_HOME
变量值:[Tomcat的安装路径],例如:D:\CodeBox\apache-tomcat-10.0.16
%CATALINA_HOME%\bin;%CATALINA_HOME%\lib
离成功又近了一步!!!,现在Tomcat环境已经配置成功了
进入Tomcat-Bin文件夹,或cmd进入Tomcat-bin文件夹:
进入CMD窗口,输入安装命令:
service.bat install
出现如下信息则代表成功:
D:\CodeBox\apache-tomcat-10.0.16\bin>service.bat install
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
Service will try to guess them from the registry.
Installing the service 'Tomcat10' ...
Using CATALINA_HOME: "D:\CodeBox\apache-tomcat-10.0.16"
Using CATALINA_BASE: "D:\CodeBox\apache-tomcat-10.0.16"
Using JAVA_HOME: ""
Using JRE_HOME: ""
Warning: Neither 'server' nor 'client' jvm.dll was found at JRE_HOME.
Using JVM: "auto"
The service 'Tomcat10' has been installed.
虽然Tomcat已经安装成功了,但是它并没有启动,我们需要到服务里面启动Tomacat
改为自动启动,以后就不需要再手动启动Tomcat啦
如下图:服务状态形式正在运行则代表启动成功!
浏览器输入:
http://localhost:8080/
恭喜你,你已经使用Tomcat成功建设了一个小型的JAVAWEB网站!!!
注意:IDEA社区免费版是不支持WEB开发模块的,您需要下载企业正式版进行开发,请进行自行购买