Opened 16 years ago
Last modified 6 years ago
#953 new enhancement
Installer: provide better Tomcat service install experience — at Initial Version
Reported by: | jbirch | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 4.0 |
Component: | Installer | Version: | |
Severity: | minor | Keywords: | |
Cc: | External ID: |
Description
Currently, Tomcat gets installed, but no services are installed, and there is no check to ensure that a JRE/JDK is installed. Users have to:
- Install JDK
- Run services.bat from Tomcat/bin
- Manually configure Apache
Although it would be great to offer a bare Tomcat option, this would take a lot of work (removing the options for Apache and PHP components during the install, providing and alternate configuration for TomCat with non-Apache MapAgent, rewriting mapadmin in .jsp, etc). In the meantime we can do a fair amount just by automating the installation of the Tomcat service when the JSP viewer is chosen with the Bundled install.
Steps for this would looks something like:
Pull the current version from:
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\@CurrentVersion
Get the value of JAVA_HOME from:
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\{@CurrentVersion}\JavaHome
Do a file search to ensure that %JAVA_HOME%\bin\java.exe exists
If it doesn't exist, we can warn the user that the Java web extensions will not be available.
If it does exist, we can run a custom action something like this to install the service (cobbled together from service.bat in Tomcat/bin):
[TomcatInstallDir]Tomcat/bin/tomcat6.exe IS[TC_SERVICE_NAME]
--DisplayName [TC_SERVICE_DISPLAYNAME] --Description [TC_SERVICE_DESCRIPTION] --LogPath=[TomcatInstallDir]\logs --ClassPath=[TomcatInstallDir]\bin\bootstrap.jar --Install [TomcatInstallDir]Tomcat/bin/tomcat6.exe --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop --Startup auto
And something similar for uninstall...