一. 安裝
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.