View Full Version : tomcat as service
murphsoft
10-12-2004, 06:44 PM
I've installed tomcat 5.0.24 that came with Laszlo 2.2. Works great as a stand-alone startup. However, if I try to do the standard tomcat "startup install" to install tomcat as a windows service, it does not create a service. Is the tomcat version shipped with Laszlo modified, and if so, can I still run it as a service?
Thanks!
bloch
10-13-2004, 07:59 AM
It is modified although very slightly.
1) we upped the default memory in the startup scripts (but not the service install).
2) we removed the docs, manager webapp, and perhaps some other bits I can't recall.
3) we've never tested the tomcat we ship as a service
If you want to run tomcat as a service and the one we ship doesn't work, I'd recommend grabbing one from jakarta, upping the memory, and installing the lps-2.2 webapp in it.
-Eric
murphsoft
10-16-2004, 05:48 AM
To install Tomcat as a service
1. Download 5.0.24 from http://archive.apache.org/dist/jakarta/tomcat-5/archive/v5.0.24/
2. Install into laszlo\server directory (after renaming Tomcat delivered with Laszlo)
3. Copy from the renamed Tomcat to the new Tomcat the
C:\Laszlo\Server\tomcat-5.0.24\conf\Catalina\localhost\lps.xml file
4. Modify C:\Laszlo\Server\tomcat-5.0.24\bin\catalina.bat and add these lines:
rem LASZLO - up the default JVM heap starting and max sizes
set JAVA_OPTS=-Xms128m -Xmx512m %JAVA_OPTS%
above these lines:
rem Execute Java with the applicable properties
if not "%JPDA%" == "" goto doJpda
5. That will only set the memory sizes if you launch Tomcat as a stand-alone process.
To set the memory size for the service, you need to update the service.bat file:
rem Set extra parameters Laszlo: -Xms128m;-Xmx512m
"%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorse d;-Xms128m;-Xmx512m" --StartMode jvm --StopMode jvm
6. If the service got installed during the Tomcat install, you can update it's memory
settings manually:
C:\Laszlo\Server\tomcat-5.0.24\bin\> net stop tomcat5
C:\Laszlo\Server\tomcat-5.0.24\bin\> tomcat5 //US//tomcat5 --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorse d;-Xms128m;-Xmx512m" --StartMode jvm --StopMode jvm
C:\Laszlo\Server\tomcat-5.0.24\bin\> net start tomcat5
7. Once Tomcat is running as a service, you don't need to launch it with the
Laszlo launcher, you can simply go to http://localhost:8080/lps-2.2/laszlo-explorer/index.jsp
to run the Laszlo Explorer
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.