tomcat下载安装与配置

1.下载
tomcat下载链接:https://tomcat.apache.org/
进入tomcat官网后,选择需要下载的版本。我选择的是tomcat9(Download)。
tomcat下载安装与配置
2.可以选择zip(pgp,sha2,sha512)进行下载,根据需要选择。

tomcat下载安装与配置
3.下载完成并解压。
tomcat下载安装与配置
tomcat下载安装与配置
4.进行配置,选择“此电脑”,单击右键,选择“属性”,单击弹窗左边的“高级系统设置”。打开‘“高级系统设置”后,单击“环境变量(N)”按钮。
5.对 CATALINA_HOME、Path 这 2 个系统变量分别设置。
如图所示:路径为自己下载保存的路径
tomcat下载安装与配置
tomcat下载安装与配置
6.添加用户,进入tomcat9的目录的conf,我这里的路径是D:\bishe\tomcat\apache-tomcat-9.0.30\conf

选择“tomcat-users.xml”文件,打开文件后在最后 一行代码的前面添加如下代码:




tomcat下载安装与配置
7.保存后退出。
8.启动tomcat测试,打开tomcat目录下的bin 文件夹,再双击startup来启动tomcat,启动成功会显示 start Server startup in [2,231] millisecinds。
tomcat下载安装与配置
tomcat下载安装与配置
9.打开浏览器,在地址栏输入http://localhost:8080 或 http://127.0.0.1:8080进行打开tomcat的主页。
tomcat下载安装与配置
10.配置完成。