当前位置:首页 > 操作系统 > MacOs

tomact在windows系统下安装

一、下载

下载地址: https://tomcat.apache.org/download-90.cgi

7,8,9的版本都可以下,这里下载最新版本

注意:Binary是编译好的,可以直接使用的版本,哪怕是tar.gz,解压即可用;Source是源代码版本,需要自己编译才行

tomact在windows系统下安装 - 文章图片

 

 二、tomcat在windows系统下安装

前置:依赖jdk,参考目录中对应的博文:https://www.cnblogs.com/tianyu2018/p/11714813.html

 tomact在windows系统下安装 - 文章图片

解压后,放到E盘

tomact在windows系统下安装 - 文章图片

E:apache-tomcat-9.0.27conf目录下的server.xml文件

tomact在windows系统下安装 - 文章图片

修改端口号,默认为8080,修改为8580

tomact在windows系统下安装 - 文章图片

进入bin目录,文本方式打开catalina.bat

tomact在windows系统下安装 - 文章图片

可以看到依赖jdk,因为已经配置了jdk的环境变量,所以下面可以直接引用

 tomact在windows系统下安装 - 文章图片

bin目录下,文本方式打开tomact在windows系统下安装 - 文章图片

tomact在windows系统下安装 - 文章图片

因为已经配置了jdk的环境变量,所以下面可以直接引用

 tomact在windows系统下安装 - 文章图片

 

 tomact在windows系统下安装 - 文章图片

 

 tomact在windows系统下安装 - 文章图片

 

 bin目录下,启动服务器,点击 tomact在windows系统下安装 - 文章图片

tomact在windows系统下安装 - 文章图片

 

 访问:http://localhost:8580/

tomact在windows系统下安装 - 文章图片

 

 

其实,也可以给Tomcat配置环境变量,这样不必每次到bin目录下启动服务

tomact在windows系统下安装 - 文章图片

 

 tomact在windows系统下安装 - 文章图片

 

 tomact在windows系统下安装 - 文章图片

1.新建变量

  TOMCAT_HOME=E:apache-tomcat-9.0.27

2.修改PATH的值:;%TOMCAT_HOME%bin

 tomact在windows系统下安装 - 文章图片

tomact在windows系统下安装 - 文章图片

 

下面提示要配置:CATALINA_HOME

 tomact在windows系统下安装 - 文章图片

1.新建变量

  TOMCAT_HOME=E:apache-tomcat-9.0.27

  CATALINA_HOME=E:apache-tomcat-9.0.27

2.修改PATH的值:;%TOMCAT_HOME%bin

tomact在windows系统下安装 - 文章图片

输入startup后,弹出左侧的日志命令行窗口

tomact在windows系统下安装 - 文章图片

 

 也可以在命令行中直接输入startup,首先按win+r键调起命令行入口

tomact在windows系统下安装 - 文章图片

 

 如果遇到电脑有拦截,请点运行

tomact在windows系统下安装 - 文章图片

tomact在windows系统下安装 - 文章图片

上面日志乱码

E:apache-tomcat-9.0.27conf目录下找到logging.properties文件,文档模式打开进行修改

tomact在windows系统下安装 - 文章图片

tomact在windows系统下安装 - 文章图片

 

 tomact在windows系统下安装 - 文章图片

 

 重新启动服务

tomact在windows系统下安装 - 文章图片

 

 tomcat在windows系统下安装完毕

 


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐