Tomcat as Window Service
This document contains steps to configure tomcat as a window service. Once tomcat configured as a window service, no need to start tomcat server by runnin start_aiv.bat file or startup.bat file. as soon as windows machine is started, tomcat server will also be started as it is configured as a window service.
Objective
objective of this document is to guide user to configure tomcat as a window service.
Reference
Kindly click on this link to get more idea about setting tomcat as service.
Set Tomcat as service
Follow below steps to set tomcat as service;
Go to your directory where AIV is installed. go to tomcat folder and open bin folder.
(your_directory)/AIV/tomcat/bin
Search for
setenv.bat
and open it in text editor. check the memory size provided.Search for
service.bat
file in this folder and open it in text editor. search forJvmMs
andJvmMx
in this file and set JvmMs as -Xms value you can see in setenv.bat file and set JvmMx as -Xmx value you can see in setenv.bat file. here i have to provide JvmMs=512 and JvmMx=6144Save this file and close it
Open command prompt and change path to bin folder.
Run this command to set tomcat as service :
service.bat install TomcatAIV
here TomcatAIV is unique service name. user can provide service name as per his convenience.
After executing this command, you will see message
The service 'TomcatAIV' has been installed
To check service has been added in windows, click window key+R button to open run window and type services.msc & hit enter to open windows service.
You will see service name TomcatAIV in service list. that means tomcat service has been added.
Right-click on this service and select properties and select startup type = Automatic and click on Apply and ok to save this changes.
Now, select the services, Right-click on the Apache Tomcat 9.0 TomacatAIV and start the services.
Check the catelina log from (Your directory)\aiv\tomcat\logs, find catelina.log and open it.
If the catelina.log shows like
org.apache.catalina.startup.Catalina.start Server startup in [249745] milliseconds
, it means the tomcat server is started and you can use the application form the browser.open the Browser and add
localhost:<port number>/aiv/
in the URL bar. For example: localhost:9091/aiv/