Re: Configuring Separate Instances Using CATALINA_BASE
Peter, thanks for your tomcat instance (Catalina_base) installation process. It has been very helpful, but I have couple of questions (interleaved with your information, below). Hey Bill, here my simple catalina.base installation description: install jakarta-tomcat-5.5.x mkdir node1 cd node1 mkdir bin conf temp logs webapps work cd bin Since what follows, edits the startup scripts, I presume the above steps included a copy of $CATALINA_HOME/bin/ contents to node1/bin/ # windows edit startup.bat set CATALINA_BASE=.. set [EMAIL PROTECTED]@ set CATALINA_OPTS=-server [EMAIL PROTECTED]@m [EMAIL PROTECTED]@m %CATALINA_HOME%\bin\catalina run %1 %2 %3 %4 %5 %6 %7 %8 %9 edit shutdown.bat set CATALINA_BASE=.. set [EMAIL PROTECTED]@ %CATALINA_HOME%\bin\catalina stop %1 %2 %3 %4 %5 %6 %7 %8 %9 # unix edit startup.sh #!/bin/sh export CATALINA_BASE=.. export [EMAIL PROTECTED]@ export [EMAIL PROTECTED]@/logs/catalina.pid export CATALINA_OPTS=-server [EMAIL PROTECTED]@m [EMAIL PROTECTED]@m exec $CATALINA_HOME/bin/catalina.sh run $@ the following should be edit shutdown.sh, right? edit startup.sh #!/bin/sh export CATALINA_BASE=.. export [EMAIL PROTECTED]@ export [EMAIL PROTECTED]@/logs/catalina.pid exec $CATALINA_HOME/bin/catalina.sh stop $@ # unix cd ../conf and use cp cd ..\conf copy @[EMAIL PROTECTED]/\server-minimal.xml server.xml copy @[EMAIL PROTECTED] copy @[EMAIL PROTECTED] # only tomat 5.5 copy @[EMAIL PROTECTED] # optional copy @[EMAIL PROTECTED] copy @[EMAIL PROTECTED] mkdir Catalina\localhost # install manager app that reference the app inside catalina.home copy @[EMAIL PROTECTED] The above step of copying manager.xml (which is an xml fragment defining a tomcat context) raises a couple of questions: 1. Should we also copy admin.xml ? (we assign its security role to a user below) 2. Having our tomcat instance use the manager and admin files in $CATALINA_HOME/server/webapps means that those apps will be shared by all tomcat instances on a given host. This seems unsafe. If multiple instances need to use manager and/or admin, I assume we should copy these apps into our new instance (node1/webapps/ in this case) and adjust the the context definitions in node1/con/Catalina/local host accordingly. edit tomcat-users.xml # add role rolename=manager/ role rolename=admin/ user username=manager password=tomcat roles=manager,admin/ edit server.xml # change ports or at your special server.xml config elements cd ..\bin startup # Tomcat works # install you apps with copy to webapps or with manager app # next instance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring Separate Instances Using CATALINA_BASE
Hey Bill, Bill Winspur schrieb: Peter, thanks for your tomcat instance (Catalina_base) installation process. It has been very helpful, but I have couple of questions (interleaved with your information, below). Hey Bill, here my simple catalina.base installation description: install jakarta-tomcat-5.5.x mkdir node1 cd node1 mkdir bin conf temp logs webapps work cd bin Since what follows, edits the startup scripts, I presume the above steps included a copy of $CATALINA_HOME/bin/ contents to node1/bin/ No, you only reference the catalina.sh|bat script. You don't need a copy. # windows edit startup.bat set CATALINA_BASE=.. set [EMAIL PROTECTED]@ set CATALINA_OPTS=-server [EMAIL PROTECTED]@m [EMAIL PROTECTED]@m %CATALINA_HOME%\bin\catalina run %1 %2 %3 %4 %5 %6 %7 %8 %9 edit shutdown.bat set CATALINA_BASE=.. set [EMAIL PROTECTED]@ %CATALINA_HOME%\bin\catalina stop %1 %2 %3 %4 %5 %6 %7 %8 %9 # unix edit startup.sh #!/bin/sh export CATALINA_BASE=.. export [EMAIL PROTECTED]@ export [EMAIL PROTECTED]@/logs/catalina.pid export CATALINA_OPTS=-server [EMAIL PROTECTED]@m [EMAIL PROTECTED]@m exec $CATALINA_HOME/bin/catalina.sh run $@ the following should be edit shutdown.sh, right? Sorry a copy/paste failure! Hups! edit startup.sh #!/bin/sh export CATALINA_BASE=.. export [EMAIL PROTECTED]@ export [EMAIL PROTECTED]@/logs/catalina.pid exec $CATALINA_HOME/bin/catalina.sh stop $@ # unix cd ../conf and use cp cd ..\conf copy @[EMAIL PROTECTED]/\server-minimal.xml server.xml copy @[EMAIL PROTECTED] copy @[EMAIL PROTECTED] # only tomat 5.5 copy @[EMAIL PROTECTED] # optional copy @[EMAIL PROTECTED] copy @[EMAIL PROTECTED] mkdir Catalina\localhost # install manager app that reference the app inside catalina.home copy @[EMAIL PROTECTED] The above step of copying manager.xml (which is an xml fragment defining a tomcat context) raises a couple of questions: 1. Should we also copy admin.xml ? (we assign its security role to a user below) Yes, look inside the xml context definition a you see that we used directly the ${catalina.home} env variable. It is a trick. You can used every env (-Dvariable} inside server.xml and all context.xml's. At Tomcat 5.5 you must install the separate admin package at you jakarta-tomcat.5.5.9 directory. 2. Having our tomcat instance use the manager and admin files in $CATALINA_HOME/server/webapps means that those apps will be shared by all tomcat instances on a given host. This seems unsafe. Why, it is unsafe? Every Host has is't own instance copy and nothing is shared at runtime! It is only a reuse of the classes files and resources. If multiple instances need to use manager and/or admin, I assume we should copy these apps into our new instance (node1/webapps/ in this case) and adjust the the context definitions in node1/con/Catalina/local host accordingly. No, you can reference the release app versions is better. When you switch the tomcat release, you also used the newest manager and admin release without your intervention. edit tomcat-users.xml # add role rolename=manager/ role rolename=admin/ user username=manager password=tomcat roles=manager,admin/ edit server.xml # change ports or at your special server.xml config elements cd ..\bin startup # Tomcat works # install you apps with copy to webapps or with manager app # next instance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Configuring Separate Instances Using CATALINA_BASE
I'm experimenting with creating a separate Tiomcat instance from the distribution, using $CATALINA_BASE, with the goal of setting up an instance that provides the admin and manager apps distributed with Tomcat, plus my own applications. At present progress is slow because I am unsure of how to provide the manager and admin apps in my new instance. I started with O'Reilly's Tomcat book (very useful), which on p 56, has a section 'Relocating the Web Applications Directory' . Unfortunately, the book does not mention that the /shared directory is also located via $CATALINA_BASE, and does not discuss relocating the admin and manager apps or why they occupy their own /server/webapps directory, instead of just residing in /webapps). Various howto's on non-jakarta, mostly edu, sites have filled the picture in somewhat, but I still do not know why the /server directory is used to hold the admin and manager apps in the distribution. Also, the following from the tomcat documentation Introduction is very misleading: /Throughout the docs, you'll notice there are numerous references to *$CATALINA_HOME*. This represents the root of your Tomcat installation. When we say, This information can be found in your $CATALINA_HOME/README.txt file we mean to look at the README.txt file at the root of your Tomcat install./ /These are some of the key tomcat directories, all relative to *$CATALINA_HOME*:/ * /*/bin* - Startup, shutdown, and other scripts. The |*.sh| files (for Unix systems) are functional duplicates of the |*.bat| files (for Windows systems). Since the Win32 command-line lacks certain functionality, there are some additional files in here./ * /*/conf* - Configuration files and related DTDs. The most important file in here is server.xml. It is the main configuration file for the container./ * /*/logs* - Log files are here by default./ * /*/webapps* - This is where your webapps go/. In fact, it seems that /conf /logs, and /webapps are actually resolved by tomcat as relative to $CATALINA_BASE, which is set by tomcat to the value in CATALINA_HOME if it is not explicitly specified when tomcat is launched. *Questions* -- * I have not been able to find a section of the documentation that deals with setting up usage-specific instances by exploiting $CATALINA_BASE. Can somebody direct me to the documentation if it exists? * Should admin and manager be copied and to and installed in a special-purpose-instance's /webapps directory, or can they be safely shared from the distribution by all instances that need them? * What is the rationale for installing admin and manager under /server in the distribution ? * Is /server interpreted relative to $CATALINA_BASE or $CATALINA_HOME Thanks for your attention, Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring Separate Instances Using CATALINA_BASE
Hey Bill, here my simple catalina.base installation description: install jakarta-tomcat-5.5.x mkdir node1 cd node1 mkdir bin conf temp logs webapps work cd bin # windows edit startup.bat set CATALINA_BASE=.. set [EMAIL PROTECTED]@ set CATALINA_OPTS=-server [EMAIL PROTECTED]@m [EMAIL PROTECTED]@m %CATALINA_HOME%\bin\catalina run %1 %2 %3 %4 %5 %6 %7 %8 %9 edit shutdown.bat set CATALINA_BASE=.. set [EMAIL PROTECTED]@ %CATALINA_HOME%\bin\catalina stop %1 %2 %3 %4 %5 %6 %7 %8 %9 # unix edit startup.sh #!/bin/sh export CATALINA_BASE=.. export [EMAIL PROTECTED]@ export [EMAIL PROTECTED]@/logs/catalina.pid export CATALINA_OPTS=-server [EMAIL PROTECTED]@m [EMAIL PROTECTED]@m exec $CATALINA_HOME/bin/catalina.sh run $@ edit startup.sh #!/bin/sh export CATALINA_BASE=.. export [EMAIL PROTECTED]@ export [EMAIL PROTECTED]@/logs/catalina.pid exec $CATALINA_HOME/bin/catalina.sh stop $@ # unix cd ../conf and use cp cd ..\conf copy @[EMAIL PROTECTED]/\server-minimal.xml server.xml copy @[EMAIL PROTECTED] copy @[EMAIL PROTECTED] # only tomat 5.5 copy @[EMAIL PROTECTED] # optional copy @[EMAIL PROTECTED] copy @[EMAIL PROTECTED] mkdir Catalina\localhost # install manager app that reference the app inside catalina.home copy @[EMAIL PROTECTED] edit tomcat-users.xml # add role rolename=manager/ role rolename=admin/ user username=manager password=tomcat roles=manager,admin/ edit server.xml # change ports or at your special server.xml config elements cd ..\bin startup # Tomcat works # install you apps with copy to webapps or with manager app # next instance I hope this help :-) Peter Bill Winspur schrieb: I'm experimenting with creating a separate Tiomcat instance from the distribution, using $CATALINA_BASE, with the goal of setting up an instance that provides the admin and manager apps distributed with Tomcat, plus my own applications. At present progress is slow because I am unsure of how to provide the manager and admin apps in my new instance. I started with O'Reilly's Tomcat book (very useful), which on p 56, has a section 'Relocating the Web Applications Directory' . Unfortunately, the book does not mention that the /shared directory is also located via $CATALINA_BASE, and does not discuss relocating the admin and manager apps or why they occupy their own /server/webapps directory, instead of just residing in /webapps). Various howto's on non-jakarta, mostly edu, sites have filled the picture in somewhat, but I still do not know why the /server directory is used to hold the admin and manager apps in the distribution. Also, the following from the tomcat documentation Introduction is very misleading: /Throughout the docs, you'll notice there are numerous references to *$CATALINA_HOME*. This represents the root of your Tomcat installation. When we say, This information can be found in your $CATALINA_HOME/README.txt file we mean to look at the README.txt file at the root of your Tomcat install./ /These are some of the key tomcat directories, all relative to *$CATALINA_HOME*:/ * /*/bin* - Startup, shutdown, and other scripts. The |*.sh| files (for Unix systems) are functional duplicates of the |*.bat| files (for Windows systems). Since the Win32 command-line lacks certain functionality, there are some additional files in here./ * /*/conf* - Configuration files and related DTDs. The most important file in here is server.xml. It is the main configuration file for the container./ * /*/logs* - Log files are here by default./ * /*/webapps* - This is where your webapps go/. In fact, it seems that /conf /logs, and /webapps are actually resolved by tomcat as relative to $CATALINA_BASE, which is set by tomcat to the value in CATALINA_HOME if it is not explicitly specified when tomcat is launched. *Questions* -- * I have not been able to find a section of the documentation that deals with setting up usage-specific instances by exploiting $CATALINA_BASE. Can somebody direct me to the documentation if it exists? * Should admin and manager be copied and to and installed in a special-purpose-instance's /webapps directory, or can they be safely shared from the distribution by all instances that need them? * What is the rationale for installing admin and manager under /server in the distribution ? * Is /server interpreted relative to $CATALINA_BASE or $CATALINA_HOME Thanks for your attention, Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]