下载tomcat

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

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

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

tomcat在windows及linux环境下安装_apache

tomcat在linux下安装

前置:依赖jdk,参考目录中对应博文:​​javascript:void(0)​

rz上传文件到linux服务器

 tomcat在windows及linux环境下安装_javascript_02

解压

tomcat在windows及linux环境下安装_tomcat_03

tomcat在windows及linux环境下安装_javascript_04

修改端口号

 tomcat在windows及linux环境下安装_tomcat_05

 默认为8080,改为8580

tomcat在windows及linux环境下安装_apache_06

保存后,进入bin目录,./startup.sh,启动tomcat

tomcat在windows及linux环境下安装_apache_07

查看是否启动成功

tomcat在windows及linux环境下安装_javascript_08

访问,ip:8580

tomcat在windows及linux环境下安装_apache_09

能访问,说明安装成功。 


查看tomcat版本

tomcat在windows及linux环境下安装_javascript_10


tomcat在windows下安装

前置:依赖jdk,参考目录中对应的博文:​​javascript:void(0)​

 tomcat在windows及linux环境下安装_apache_11

解压后,放到D盘

tomcat在windows及linux环境下安装_javascript_12

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

tomcat在windows及linux环境下安装_javascript_13

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

tomcat在windows及linux环境下安装_tomcat_14

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

tomcat在windows及linux环境下安装_apache_15

bin目录下,文本方式打开

tomcat在windows及linux环境下安装_javascript_16

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

tomcat在windows及linux环境下安装_javascript_17

tomcat在windows及linux环境下安装_javascript_18

 tomcat在windows及linux环境下安装_tomcat_19

bin目录下,启动服务,点击:

tomcat在windows及linux环境下安装_javascript_20

tomcat在windows及linux环境下安装_javascript_21

访问:​​http://localhost:8580/​

tomcat在windows及linux环境下安装_apache_22

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

tomcat在windows及linux环境下安装_javascript_23

tomcat在windows及linux环境下安装_javascript_24

tomcat在windows及linux环境下安装_javascript_25

1.新建变量

  TOMCAT_HOME=D:\apache-tomcat-9.0.19

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

下面提示要配置:CATALINA_HOME

tomcat在windows及linux环境下安装_tomcat_26

新建变量:CATALINA_HOME=D:\apache-tomcat-9.0.19

修改PATH的值:;%CATALINA_HOME%\bin

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

tomcat在windows及linux环境下安装_tomcat_27

 也可以在命令行中直接输入startup

tomcat在windows及linux环境下安装_javascript_28

tomcat在windows及linux环境下安装_apache_29

tomcat在windows及linux环境下安装_apache_30

上面日志乱码

tomcat在windows及linux环境下安装_tomcat_31

改为GBK

tomcat在windows及linux环境下安装_tomcat_32

重启服务

tomcat在windows及linux环境下安装_tomcat_33



至此,安装完成。

声明:如有侵权,请联系删除。

============================= 升职加薪 ==========================