更新时间:2022-05-09 13:55:50
一. 下载地址
http://tomcat.apache.org/download-90.cgi
找到最下面source code下载->解压
二. 编译
安装ant->把ant bin目录配置到环境变量里面
在tomcat源代码根目录执行 ant命令
三. 运行
cd到tomcat源代码目录->output->build->bin目录
执行 ./startup.sh
关闭tomcat ./shutdown.sh
四. 添加tomcat管理员
打开tomcat源代码/conf/tomcat-users.xml
添加一行,如下:
1
2
3
4
5
6
|
< tomcat-users xmlns = "http://tomcat.apache.org/xml"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://tomcat.apache.org/xml tomcat-users.xsd"
version = "1.0" >
< user username = "admin" password = "123" roles = "manager-gui" />
</ tomcat-users >
|
五. 访问tomcat
打开浏览器->localhost:8080
点击manager app
输入用户名和密码 admin/123