|
由于习惯直接解压缩,然后拷贝整个tomcat到服务器上,因此需要手工把tomcat安装成windows服务;
利用以下脚本即可实现: 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 2004/04/08 16:49:37 mturk Exp $ rem - — — — — — — — — — — — — — — — — — — — — — — — — — – rem Guess CATALINA_HOME if not defined set CURRENT_DIR=%cd% if not "%CATALINA_HOME%" == "" goto gotHome set CATALINA_HOME=%cd% if exist "%CATALINA_HOME%\bin\tomcat5.exe" goto okHome rem CD to the upper dir cd .. set CATALINA_HOME=%cd% :gotHome if exist "%CATALINA_HOME%\bin\tomcat5.exe" goto okHome echo The tomcat.exe was not found… echo The CATALINA_HOME environment variable is not defined correctly. echo This environment variable is needed to run this program goto end :okHome if not "%CATALINA_BASE%" == "" goto gotBase set CATALINA_BASE=%CATALINA_HOME% :gotBase
set EXECUTABLE=%CATALINA_HOME%\bin\tomcat5.exe
rem Set default Service name set SERVICE_ [1] [2] [3] 下一页
|