修改服务名称
打开Tomcat7.0.65_1/bin/service.bat 修改注册服务名称 当然这个名字自己改 比如Tomcat7_2
原始文件:
set SERVICE_NAME=Tomcat7
set DISPLAYNAME=Apache Tomcat 7.0 %SERVICE_NAME%
Tomcat7改为Tomcat7_2
Apache Tomcat 7.0改为Apache Tomcat 7.0_2
我这里为了方便区分,2个Tomcat的服务名称均做了修改,
Tomcat7_1,Tomcat7_2
注册服务
打开cmd,进入到【部署tomcat的根目录】Tomcat7.0.65_1/bin,输入 service.bat install 服务名
再切换到第二个tom根目录进行注册。
比如我注册的
service.bat install scm
service.bat install edoc
打开services.msc即可看到添加注册的新服务 Apache Tomcat 7.0_1,依次注册2即可,进入服务设置自动启动。
如要删除服务,同样需进入对应Tomcat的bin目录下,输入 service.bat remove 服务名 可以移除服务