赞
踩
1、将apache-tomcat-10.0.18放置到任意位置
2、设置环境变量
从jdk生成jre
jlink.exe --module-path jmods --add-modules java.desktop --output jre
CATALINA_HOME = D:\apache-tomcat-10.0.18
path = %CATALINA_HOME%\lib;%CATALINA_HOME%\bin;
3、cd D:\apache-tomcat-10.0.18\conf目录下修改logging.properties文件,修改Console编码UTF-8为GBK
4、startup.bat install
5、service.bat install
6、tomcat10w start
7、在浏览器输入http://localhost:8080/,显示以下画面则安装成功
二,多个tomcat
1、复制一份tomcat,修改名称为
2、分修改apache-tomcat-2/conf下的sever.xml的端口与apache-tomcat-1下的不同
secretRequired="false"
3、新建环境变量
CATALINA_HOME1 = D:\apache-tomcat-1
CATALINA_HOME2 = D:\apache-tomcat-2
Path+=%CATALINA_HOME1%\lib;%CATALINA_HOME1%\bin;%CATALINA_HOME2%\lib;%CATALINA_HOME2%\bin;
4、同时启动两个服务
在startup.bat文件中添加
"set TITLE=tomcat1"
"set CATALINA_BASE=D:\apache-tomcat-1"
"set CATALINA_HOME="D:\apache-tomcat-1""set TITLE=tomcat2"
"set CATALINA_BASE=D:\apache-tomcat-2"
"set CATALINA_HOME=D:\apache-tomcat-2"
http://localhost:8080/http://localhost:8080/
http://localhost:8081/http://localhost:8081/5、成功则显示
三、nginx配置
nginx命令
1、start nginx.exe
2、nginx -s stop
3、nginx -s reload
查看nginx进程
tasklisk /fi "imagename eq nginx.exe"
查看端口占用
netstat -ano | findstr 0.0.0.0:80 | findstr "80"
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。