fjun0910的专栏

鉴于止水,修己以敬。

jdk tomcat和mysql整合在一

1。注册服务 service.bat

 

@echo off
set JAVA_HOME=%cd%/java
set CATALINA_HOME=%cd%/tomcat
set MYSQL_HOME=%cd%/mysql

if "%1" == "install" goto install
if "%1" == "remove" goto remove

:install

call "%MYSQL_HOME%/bin/mysqld-nt.exe" install MySQL_ZCMS --defaults-file="%MYSQL_HOME%/my.ini"
net start "MySQL_ZCMS"

call "%CATALINA_HOME%/bin/service" install ZCMS
net start "Apache Tomcat ZCMS"

goto end

:remove
net stop "Apache Tomcat ZCMS"
call "%CATALINA_HOME%/bin/service" remove ZCMS

net stop "MySQL_ZCMS"
call "%MYSQL_HOME%/bin/mysqld-nt.exe" remove  MySQL_ZCMS
goto end

:end

 

这里文件夹结构

|----java-------------bin、jre、lib

|----mysql----------bin、data、share、my.ini

|----tomcat--------bin、conf、webapps

|------service.bat

阅读更多
个人分类: java
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

jdk tomcat和mysql整合在一

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭