nginx-tutorial/examples/scripts/demo02-start.bat

26 lines
1018 B
Batchfile
Raw Normal View History

2018-10-12 18:31:56 +08:00
@echo off
2018-07-04 23:15:42 +08:00
rem -----------------------------------------------------------------------------
rem Demo02 - 负载均衡配置Nginx/demos/nginx-1.14.0/conf/demos/demo02.conf
rem 1. 启动 Nginx
rem 2. 启动三个 JavaApp访问地址分别为
2018-07-05 10:07:17 +08:00
rem localhost:9021
rem localhost:9022
rem localhost:9023
2018-07-04 23:15:42 +08:00
rem -----------------------------------------------------------------------------
2018-10-12 18:31:56 +08:00
2018-07-04 23:15:42 +08:00
echo ">>>> 1. Start nginx"
2018-10-12 18:31:56 +08:00
pushd %~dp0..\nginx-1.14.0
2018-07-04 23:15:42 +08:00
call nginx-start.bat
2018-10-12 18:31:56 +08:00
popd
2018-07-04 23:15:42 +08:00
2018-07-05 10:07:17 +08:00
echo ">>>> 2. Start 3 java app: localhost:9021, localhost:9022, localhost:9023"
2018-10-12 18:31:56 +08:00
pushd %~dp0..\javaapp
2018-07-11 17:23:28 +08:00
start /min java -Dtomcat.connector.port=9021 -cp "target/JavaWebApp/WEB-INF/classes;target/JavaWebApp/WEB-INF/lib/*" io.github.dunwu.Main
start /min java -Dtomcat.connector.port=9022 -cp "target/JavaWebApp/WEB-INF/classes;target/JavaWebApp/WEB-INF/lib/*" io.github.dunwu.Main
start /min java -Dtomcat.connector.port=9023 -cp "target/JavaWebApp/WEB-INF/classes;target/JavaWebApp/WEB-INF/lib/*" io.github.dunwu.Main
2018-10-12 18:31:56 +08:00
popd
2018-07-04 23:15:42 +08:00
pause