On Wednesday, June 13, 2018 10:20 PM Christopher Schultz wrote:
>On 6/13/18 12:14 PM, Lemke, Michael  ST/HZA-ZIC2 wrote:
>
>> What is a recommended setup on Windows? So far I am still at a loss
>> and can't find anything anywhere.
>
>Regardless of platform, I always recommend a split-install where you
>have separate CATALINA_HOME (this is where you unpack the Tomcat
>distribution files) and CATALINA_BASE (this is where you have your own
>conf/* files private to the particular service you are running).
>

Chris,

thanks a lot for this hint. I managed to get it set up the way I like.

>
>Most non-trivial deployments of Tomcat are simply too complicated to
>give a cookie-cutter template for people to use. The cookie-cutter
>template we have is:
>
>C:> unzip apache-tomcat-x.y.z.zip
>C:> cd apache-tomcat-x.y.z
>C:> set CATALINA_HOME=[here]
>C:> set CATALINA_BASE=[path to custom config]
>C:> service.bat install
>
>If you want to step outside of that cookie-cutter path, then you have
>to start understanding how all the pieces fit together so you can
>build-up a deployment that meets your own needs.

This is what I did:

mkdir c:\Program Files\tomcat
unzip apache-tomcat-x.y.z.zip -d c:\Program Files\tomcat
mkdir d:\tomcat-server-1\{bin,conf,logs,temp,webapps,work}
cp -r c:\program files\tomcat\apache-x.y.z\conf d:\tomcat-server-1\

create d:\tomcat-server-1\bin\setenv.bat with this content:
set "CATALINA_BASE=%~dp0%.."

d:\tomcat-server-1\bin\setenv.bat
cd c:\program files\tomcat\apache-x.y.z\bin
.\service.bat install

That was it. Unfortunately, I couldn't call service.bat with a full 
path as then it wouldn't find itself. In the script CATALINA_HOME
defaults to %cd%. If it would default to %~dp0% I could have called
the script directly. Anyway.

I modified my d:\tomcat-server-1\conf\server.xml the way I need it 
and the tomcat service started right away.

So the most important part for me was that you have to create 
CATALINA_BASE yourself and put some files from the distribution there. 
I wish tomcat came with a script which does this. But once you know
what is required it isn’t hard to do.

Thanks again,
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to