The way I do this is by using a CATALINA_HOME/CATALINA_BASE structure. The tomcat distribution is the CATALINA_HOME directory.
You create another directory structure that becomes CATALINA_BASE. In this directory structure, you would create: temp work conf conf/<EngineName>/<HostName> logs webapps I also use a shared/lib directory to hold jar files that I want shared across all of my contexts. In 6.0.20 I had to add this to the catalina.properties file. Now, Copy the CATALINA_HOME/conf files to CATALINA_BASE/conf and modify them as desired. Before you invoke the startup script, you export the variables so the startup script sees them. On my system it's something like: CATALINA_HOME=/usr/local/apache-tomcat-6.0.20 CATALINA_BASE=/srv/tomcat Now, upgrading to a new version is somewhat simpler because you only have to change the version # for CATALINA_HOME If you're using log4j, it gets a little sticky because you have to put some property files in the common/classes directory and put log4j.jar in common/lib (at least in 5.5.27). I think you might be able to get around this by doing some edit to the common loader entry in catalina.properties, but I haven't had a chance to test it. At any rate, I like this approach because you don't have to worry about finding and disabling all sample installations, admin apps, etc. If you have to revert to a previous version after making some changes, you don't have to worry about finding the edits and migrating them back to a previous version. This is also a good solution if you want to have multiple tomcats on one machine. You have one CATALINA_HOME directory and as many CATALINA_BASE directories as you need. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 > -----Original Message----- > From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Sent: Monday, August 24, 2009 9:58 AM > To: Tomcat Users List > Subject: Re: upgrade from 6.0.10 to 6.0.20 and retain conf and webapps. > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > lowercase g, > > On 8/24/2009 10:59 AM, g f wrote: > > I searched the tc website and google and havent had much luck finding > info > > on minor upgrades...most posts pertain to major (5.5 to 6.0 etc.) > > I was wondering if it was possible to just overwrite the bin and the > lib > > directory in order to accomplish this upgrade? > > Tomcat doesn't really support "upgrades" per-se... you have to do a new > install. How much configuration and webapps are we talking about? > > Tomcat comes with only a few webapps configured out-of-the box. You > should be able to do the following with little trouble: > > 1. Install Tomcat 6.0.20 > 2. Delete everything in (new) webapps > 3. Copy (or move) everything from your old webapps to the new webapps > 4. Examine the differences between old server.xml and new server.xml > 5. MERGE the changes between the server.xml files > 6. Repeat #4/#5 with conf/context.xml and conf/web.xml if you > have customized them at all > 7. Repeat #6 with the lib/ directory's libraries. Make sure anything > you put in there gets copied to the new install. > > I highly recommend doing a MERGE rather than a simple replacement just > in case something has changed. These files are generally not that long > and involved (unless you added a ton of stuff to them, but the marge > will still not be too bad), so I think it's worth it. > > Good luck, > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkqSuIkACgkQ9CaO5/Lv0PCGAQCfZ1CHWKIZ031YXxTKmWV8CCXs > fqkAoIJWI62hooDNaQFWqOjISpoLLeJn > =rMuu > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org