批处理启动mysql和tomcat
要给客户自己看成果,就要把项目和Tomcat一起给客户,然后只要双击一个批处理文件就能启动服务。
1.把jre,tomcat,mysql都拷贝到同一文件夹目录下,
2.basedir和datadir路径由下面的bat写入
3.把以下bat放在与tomcat同级的目录下,bat文件如下:
set"CURRENT_DIR=%cd%"
set"CATALINA_HOME=%CURRENT_DIR%\apache-tomcat-6"
setJRE_HOME=%CURRENT_DIR%\Java\jre6
setCLASSPATH=%JRE_HOME%\lib
setPATH=%PATH%;%JRE_HOME%\bin
echobasedir="%CURRENT_DIR%\mysql-win32">>%CURRENT_DIR%\mysql-win32\my.ini
echodatadir="%CURRENT_DIR%\mysql-win32\data">>%CURRENT_DIR%\mysql-win32\my.ini
start%CURRENT_DIR%\mysql-win32\bin\mysqld.exe
ping-n5127.0.0.1>nul
call%CATALINA_HOME%\bin\startup.bat
ping-n20127.0.0.1>nul
starthttp://localhost:8080/startcareer/user/gotologin
pause
相关推荐
smalllove 2020-11-03
wuhuaguwuhuaguo 2020-09-15
guying 2020-08-16
wqcong 2020-06-14
chenzhiwei 2020-06-13
talkingDB 2020-05-05
83206837 2020-05-01
Yasin 2020-03-03
Amzaing00 2020-01-06
GechangLiu 2020-01-05
shenghua 2013-03-27
文山羊 2019-12-16
乾坤一碼農 2019-12-11
dongxurr 2019-12-09
bluestartlxp 2019-11-27
86427217 2015-04-18
thankinglove 2015-09-06
圆圆的世界CSDN 2019-11-07
longxiang 2010-04-07