Automatic Start of SuperMap iServer on Windows System
Instruction
After successfully deploying SuperMap iServer, it is necessary to manually start iServer every time the computer is restarted. How can iServer be automatically started every time the computer is restarted? Today, let's take a look at how to set iServer to boot automatically in a Windows system!
In the Windows system, setting the SuperMap iServer to boot automatically can be done by setting the SuperMap iServer to start as a Windows system service and setting the system service to boot mode automatically. Starting SuperMap iServer as a Windows system service can be achieved through the service.bat script or through the commands provided by Tomcat. If there is a previous version of iServer service in the Windows system service, it needs to be removed first before registering and starting the service.
The following describes how to set up the startup of SuperMap iServer in Windows system service mode. It is recommended to open cmd.exe as an administrator when performing the following operations.
1. Delete existing SuperMap iServer services
If the SuperMap iServer service already exists in the Windows system service, delete it first by using the following method:
Open cmd.exe and enter the following command:
Remove it by service.bat command
Open cmd.exe, navigate to [SuperMap iServer_HOME]\bin, and enter the following command:
Locate to [SuperMap iServer_HOME]\bin, and enter the following command:
Note: If an older version of iServer already exists in the Windows system service, you should first view the service name in the Windows service before deleting it. It is recommended to use the first method. For example, if the service name of SuperMap iServer7C is "iServer7C", the delete command is: sc delete iServer7C.
2. Register SuperMap iServer service
SuperMap iServer can be registered as a system service through the service.bat and Tomcat commands, and the recommended method is to register through service.bat.
The service.bat script provided by SuperMap iServer sets common parameters and recommended values for Java virtual machines, so no other settings are required after registering the service using this script. This script is located in [SuperMap iServer_HOME]\bin and can be used to register/remove services. For example, when registering a service, open cmd.exe as an administrator, navigate to [SuperMap iServer_HOME]\bin, and enter the install command as follows:
Among them, when starting multiple iServer services on a single machine, in order to avoid the impact of duplicate service names on registration, it is necessary to modify the service name in service.bat, that is, the value of "SERVICE_NAME", as follows:
领英推荐
IS command of Tomcat
You can register the "iServer11i (2022)" service through the IS command provided by Tomcat, and the string after //IS// is the service name, which can be modified to the desired name. Navigate to [SuperMapiServer_HOME]\bin and enter the following command:
tomcat8 //IS//iServer11i(2022) --DisplayName="SuperMap iServer 11i(2022)" --Install="【SuperMapiServer_HOME】\bin\tomcat8.exe" --Jvm=auto --StartMode=jvm --StopMode=jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop --Classpath="【SuperMapiServer_HOME】\bin\bootstrap.jar;【SuperMapiServer_HOME】\bin\tomcat-juli.jar" --Environment path='%UGO_HOME%\bin;%path%;'
3. Set the SuperMap iServer service to boot automatically
After registration is completed, the SuperMap iServer service can be seen in the Windows system services, which can be manually started/stopped, or set to start automatically. You can first test whether manual start/stop can proceed normally. If it can start normally, automatic start can also start normally, and then set it to automatic start verification.
Example
Taking service.bat as an example, the complete setup of the Windows system SuperMap iServer startup process is as follows.
1. First, press the [win]+[R] keys on the keyboard to open the search box. Enter "dcomcnfg" in the open box, click [OK] or press the [enter] key on the keyboard, as shown in the following figure:
2. Click on "Service (Local)" to check if there is already a SuperMap iServer system service available
3. If not, execute the next step directly. If so, open cmd.exe and delete service by using the command ./service.bat remove, as shown in the figure:
4. After successful deletion, execute the registration service command: ./service.bat install.
5. Repeat steps 1 and 2 to check if the registration has been successful, locate the corresponding service, right-click on "Properties", and set the startup type to "Automatic".
6. The SuperMap iServer is set to start automatically, and the computer is restarted for verification.
Note:?We are looking for distributors, resellers, and partners all over the world. For any inquiry, please contact us at:?[email protected] .