On Wednesday, June 13, 2018 3:11 PM Igal Sapir wrote: >On 6/13/2018 3:58 AM, Lemke, Michael ST/HZA-ZIC2 wrote: >> I've been struggling to come to grips with Tomcat installation on Windows >> Server but I couldn't really find a clear answer. This is what I want to >> achieve: >> >> * Have one directory tree with all my webapps >> * Have a tomcat installation somewhere different, like C:\Program Files >> * run tomcat as a service >> * be able to easily replace/update the tomcat installation >> >> I could run the supplied installer and it created a working service. Editing >> server.xml I could make it use my intended webapps directory. So far so good >> (if I got that server.xml right) but now all lives in something like >> D:\apache-tomcat-9.0.6. Not good. The Windows service configuration has this >> path hard coded in its definition, the directory has files with installation >> specific configuration and some other live working directories also end up >> there. >> Any suggestion how to do this right? So that I can easily upgrade this to >> say, tomcat 9.0.8? > >You can use bin/service.bat [1] to install the service with the settings >that you want. > >Set your configuration settings in environment variables, e.g. > > set CATALINA_HOME=<path-to-Tomcat-binaries> > set JRE_HOME=<path-to-JRE> >
Can you elaborate on this? Which variables and do they have to be environment variables? I'd rather much prefer parameters to install scripts. Further down you refer to CATALINA_BASE. Would I not have to start with it to achieve the goals stated above? >Then install the Windows service with > > service.bat install > >If you want to update a previous installation then first uninstall the >service with > > service.bat uninstall > >Be sure to check the changelog for breaking changes first. But then I have to manually copy my whole server.xml configuration and hope it is still compatible? Move all logfiles over? It is that I need to separate the Tomcat installation from my specific configuration and from the runtime requirements. Is this not possible? What is a recommended setup on Windows? So far I am still at a loss and can't find anything anywhere. > >> For now, I'd be happy with a single Tomcat service but to be able to have >> several (on different ports of course) would be a welcome bonus. > >Use a different SERVICE_NAME and a different CATALINA_BASE for each >installation. e.g. > > set CATALINA_BASE=<path-to-Tomcat-config-setup> > >[1] https://github.com/apache/tomcat/blob/trunk/bin/service.bat#L17 > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org