日期:2014-05-16  浏览次数:21040 次

如何将解压缩版的tomcat加入windows系统服务

tomcat/bin目录下有个service.bat文件,编辑这个文件可以看到头部的注释:
rem ---------------------------------------------------------------------------
rem NT Service Install/Uninstall script
rem
rem Options
rem install???????????????? Install the service using Tomcat5 as service name.
rem???????????????????????? Service is installed using default settings.
rem remove????????????????? Remove the service from the System.
rem
rem name???????? (optional) If the second argument is present it is considered
rem???????????????????????? to be new service name???????????????????????????????????????????
rem
rem $Id: service.bat,v 1.5.2.1 2004/08/23 22:54:32 mturk Exp $
rem ---------------------------------------------------------------------------
可见执行 service install即可加入系统服务,反之执行service remove即可移除系统服务 name就是服务名,比如执行“service install tomcat555”那么系统服务里面增加的服务名是“Apache Tomcat tomcat555”反之移除的时候也要写“service remove tomcat555”这样你就可以将你的服务器上的若干tomat都加入系统服务了
注:rem命令是批处理的“注释”命令

?

==========================详细说明============================

1.将zip版的tomcat解压:我自己的是解压到E:\tomcat-1(这个根据自己的情况而定)

?