1. register tomcat with service name xxx(without space)
First run cmd.exe as administrator
先以系統管理員身分執行命令提示字元
First run cmd.exe as administrator
先以系統管理員身分執行命令提示字元
Then type following command
<tomcat-root>/bin/service.bat install xxx
Service name in Windows Service will be: xxx
display name in Windows Service will be: Apache Tomcat xxx
(tried under tomcat7)
remove service
<tomcat-root>/bin/tomcat7.exe //DS//xxx
2. windows command sc is an alternative
usage:
sc <server> [command] [service name] <option1> <option2>...
example:
sc create xxx binPath= <tomcat-root>/bin/startup.bat start= auto
will create service xxx, startup with command <tomcat-root>/bin/startup.bat
and we can customize startup.bat....:)
update: service is installed but when startup service, tomcat can't be started.
seems that startup.bat is not suit for service.
simply type sc to read description, type sc [command] to read description of [command]
2. windows command sc is an alternative
usage:
sc <server> [command] [service name] <option1> <option2>...
example:
sc create xxx binPath= <tomcat-root>/bin/startup.bat start= auto
will create service xxx, startup with command <tomcat-root>/bin/startup.bat
and we can customize startup.bat....:)
update: service is installed but when startup service, tomcat can't be started.
seems that startup.bat is not suit for service.
simply type sc to read description, type sc [command] to read description of [command]
沒有留言:
張貼留言