OS/Server > Windows

Tomcat Windows 서비스등록/ 삭제

윈도우에 서비스로 등록

tomcat 설치된 디렉토리로 이동 ( tomcat_home/bin/service.bat )

D:\soft\tomcat\Tom8\bin\service.bat

JAVA_HOME 등록한다.

...
setlocal

set JAVA_HOME="D:\soft\java\jdk1.8.0_221"

set "SELF=%~dp0%service.bat"
rem Guess CATALINA_HOME if not defined
...

서비스명 변경할 경우

...
set "EXECUTABLE=%CATALINA_HOME%\bin\tomcat8.exe"

rem Set default Service name
set SERVICE_NAME=MyTomcat8
set DISPLAYNAME=HomePage %SERVICE_NAME%

if "x%1x" == "xx" goto displayUsage
...

서비스를 install 한다.

D:\soft\tomcat\Tom8\bin>service.bat install

서비스를 삭제 할려면

D:\>sc delete MyTomcat8

서비스 확인 및 실행등

D:\soft\tomcat\Tom8\bin>services.msc