一. 安装
1. 服务器安装 一路默认,ok
2. jdk 安装 并配置环境变量
JAVA_HOME=安装目录
path=末尾追加;%JAVA_HOME%\bin
classpath:末尾追加;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\jre\lib\rt.jar
3. 安装tomcat 选择 32/64 BIT windows server install 版本
双击安装,一路next 到
把Host Manager 选上
继续next
创建快捷方式,login密码 都填写上
next 安装完成
4. 安装完成后 可以查看下 是否已经启动了,
cmd 窗口 netstat -noa|findstr "8080"
右键单击任务栏 调出 任务管理器,查看服务栏位
监听已经启动了,在外网输入地址 http:xx.xx.xx.xx:8080 可能访问不了,
需要关闭防火墙,点击网络,打开网络控制中心,
左下角,windows防火墙,自己设置,或直接关闭,就行了
二. tomcat 设置
1. 调节上传文件大小,默认是50M的,有点小了,默认也只有全量安装应用app,
安装目录/webapp/manager/WEB-INF/web.xml
自行调节大小
2. 用户配置
安装目录/config/tomcat-users.xml
默认的角色有4类,按规则 自行填写
- manager-gui - allows access to the HTML GUI and the status pages
- manager-script - allows access to the text interface and the status pages
- manager-jmx - allows access to the JMX proxy and the status pages
- manager-status - allows access to the status pages only
The HTML interface is protected against CSRF but the text and JMX interfaces are not. To maintain the CSRF protection:
- Users with the manager-gui role should not be granted either the manager-script or manager-jmx roles.
- If the text or jmx interfaces are accessed through a browser (e.g. for testing since these interfaces are intended for tools not humans) then the browser must be closed afterwards to terminate the session.