Re: Easy Way to Upgrade Tomcat Versions?

2009-11-30 Thread Pid

On 30/11/2009 16:02, Thomas Moorer wrote:

Hi All,

I have been thinking about upgrading my Tomcat 6.0.16
instance to the latest 6.0.20. I have been thinking about the best way
to do that. I have modified several config and shell files and suppose
I could just copy those to the 6.0.20 instance, but then I began to
wonder if I could just update the Tomcat specific files in my current
install location.

Is it acceptable as an upgrade method to just
copy the 6.0.20/lib/*.jar files into the existing 6.0.16/lib directory?
Basically, just overwrite the existing Tomcat 6.0.16 libraries with the
newer 6.0.20 libraries.

Is this an acceptable way to upgrade? What are the potential issues with this 
method?

Thanks in advance.
Thomas

  
email: tcm...@yahoo.com


There's no incremental upgrade process, but it's usually inadvisable to 
copy jar files over the top of the old ones, do so at your own risk.


bin/setenv.sh is a good location to do custom config for the shell 
scripts.  I usually copy that straight over, but rewrite server.xml  
context.xml.



p


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



RE: Easy Way to Upgrade Tomcat Versions?

2009-11-30 Thread George Sexton


 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Sent: Monday, November 30, 2009 10:17 AM
 To: users@tomcat.apache.org
 Subject: Re: Easy Way to Upgrade Tomcat Versions?
 
 On 30/11/2009 16:02, Thomas Moorer wrote:
  Hi All,
 
  I have been thinking about upgrading my Tomcat 6.0.16
  instance to the latest 6.0.20. I have been thinking about the best
 way
  to do that. I have modified several config and shell files and
 suppose
  I could just copy those to the 6.0.20 instance, but then I began to
  wonder if I could just update the Tomcat specific files in my current
  install location.
 
  Is it acceptable as an upgrade method to just
  copy the 6.0.20/lib/*.jar files into the existing 6.0.16/lib
 directory?
  Basically, just overwrite the existing Tomcat 6.0.16 libraries with
 the
  newer 6.0.20 libraries.
 
  Is this an acceptable way to upgrade? What are the potential issues
 with this method?
 
  Thanks in advance.
  Thomas
 

  email: tcm...@yahoo.com
 
 There's no incremental upgrade process, but it's usually inadvisable to
 copy jar files over the top of the old ones, do so at your own risk.
 
 bin/setenv.sh is a good location to do custom config for the shell
 scripts.  I usually copy that straight over, but rewrite server.xml 
 context.xml.
 


This is why people should use CATALINA_HOME/CATALINA_BASE style
configuration.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585


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



Re: Easy Way to Upgrade Tomcat Versions?

2009-11-30 Thread Tobias Crefeld
Am Mon, 30 Nov 2009 08:02:41 -0800 (PST)
schrieb Thomas Moorer tcm...@yahoo.com:

 I have been thinking about upgrading my Tomcat 6.0.16
 instance to the latest 6.0.20. I have been thinking about the best way
 to do that. I have modified several config and shell files and suppose
 I could just copy those to the 6.0.20 instance, but then I began to
 wonder if I could just update the Tomcat specific files in my current
 install location.

Usually (!) it should be enough if you copy the files from conf/ and
bin/ (and your application, of course) to the new apache-tomcat-tree.


 Is it acceptable as an upgrade method to just
 copy the 6.0.20/lib/*.jar files into the existing 6.0.16/lib
 directory?

It depends on how clean your installation is. If you have put
additional jars into the apache-tomcat/lib/ - directory in the past
this might be the better way. Of course this isn't good practice
because application specific jars should be installed unter
webapps/application/WEB-INF/lib/.


Running Unix/Linux I prefer another practice. In the home-dir of the
tomcat-User I create a skeleton similar to the following:

~/tomcat
~/tomcat/bin
~/tomcat/webapps
~/tomcat/webapps/bsps - ../default/webapps/examples
~/tomcat/webapps/docs - ../default/webapps/docs
~/tomcat/webapps/manager - ../default/webapps/manager
~/tomcat/webapps/j4p
~/tomcat/webapps/probe
~/tomcat/webapps/ROOT - ../../ROOT
~/tomcat/temp
~/tomcat/conf
~/tomcat/conf/Catalina
~/tomcat/work
~/tomcat/work/Catalina
~/tomcat/lib - default/lib
~/tomcat/logs - ../logs
~/tomcat/default - /opt/apache-tomcat-6.0.20
~/logs
~/ROOT


Under /opt I install the Tomcat-versions out of the... tar.gz-archive:
/opt
/opt/apache-tomcat-6.0.18
/opt/apache-tomcat-6.0.18/conf
/opt/apache-tomcat-6.0.18/webapps
/opt/apache-tomcat-6.0.18/bin
/opt/apache-tomcat-6.0.18/lib
/opt/apache-tomcat-6.0.18/temp
/opt/apache-tomcat-6.0.18/work
/opt/apache-tomcat-6.0.18/logs
/opt/apache-tomcat-6.0.20
/opt/apache-tomcat-6.0.20/conf
/opt/apache-tomcat-6.0.20/webapps
/opt/apache-tomcat-6.0.20/bin
/opt/apache-tomcat-6.0.20/lib
/opt/apache-tomcat-6.0.20/temp
/opt/apache-tomcat-6.0.20/work
/opt/apache-tomcat-6.0.20/logs
...

After this preparation changing to another tomcat-version is just a
deletion and re-creation of the symbolic link default 
( ~/tomcat/default - /opt/apache-tomcat-6.0.20 ) and you roll back
to an older version the same way.

In this setup your configuration and scripting under tomcat/conf/ and
tomcat/bin/ is left untouched and the factory-installation of tomcat
under /opt is left untouched as well. 

By setting links under tomcat/ to default/xyz/ you tell your
installation to take the factory-default and by replacing the links to
a separate directory (like tomcat/conf/) you can customize your
installation. Of course you have to pay attention that your customized
directories stay compatible if you made a Tomcat-update by exchanging
the links as described above but usually there is no need to change
something.

Maybe this principle works under MS-Windows as well. I read that MS is
offering symbolic links since WinXP-SP2 but I have not much experience
with their OS.


Regards,
 Tobias.

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



Re: Easy Way to Upgrade Tomcat Versions?

2009-11-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tobias,

On 11/30/2009 1:30 PM, Tobias Crefeld wrote:
 Am Mon, 30 Nov 2009 08:02:41 -0800 (PST)
 schrieb Thomas Moorer tcm...@yahoo.com:
 
 I have been thinking about upgrading my Tomcat 6.0.16
 instance to the latest 6.0.20. I have been thinking about the best way
 to do that. I have modified several config and shell files and suppose
 I could just copy those to the 6.0.20 instance, but then I began to
 wonder if I could just update the Tomcat specific files in my current
 install location.
 
 Usually (!) it should be enough if you copy the files from conf/ and
 bin/ (and your application, of course) to the new apache-tomcat-tree.

That's a great way to a) downgrade your install or b) destroy your install.

Let's see what's in the bin/ directory of a standard Tomcat install:

1. bootstrap.jar - Looks important! Should you really clobber this?
2. tomcat-*.jar  - Same here!
3. tomcat6*.exe  - Hope there aren't any bugs in the old version!
4. *.sh / *.bat  - Same here!

This may sound silly until you realize that even the shell scripts are
updated across minor versions sometimes. There was a bug where setting
the logger via a system property resulted in a mangled command-line that
failed to properly launch the JVM. This was fixed with a tweak to the
shell script that starts Tomcat.

If you copied that script from your old installation, you'd be
upgrading in the sense that a lot of the code would be new, but the
scripts would still be broken, along with everything else.

The only thing in bin/ that it's safe to blindly copy to a new Tomcat
install is bin/setenv.sh (or bin\setenv.bat) and that's because Tomcat
does not come packaged with such a file.

 It depends on how clean your installation is. If you have put
 additional jars into the apache-tomcat/lib/ - directory in the past
 this might be the better way. Of course this isn't good practice
 because application specific jars should be installed unter
 webapps/application/WEB-INF/lib/.

The exception to this rule is, of course, JDBC drivers. I'm sure there
are other examples as well.

 Running Unix/Linux I prefer another practice. In the home-dir of the
 tomcat-User I create a skeleton similar to the following:
 
 ~/tomcat

...

OMG are you a Linux distro package maintainer?

 After this preparation changing to another tomcat-version is just a
 deletion and re-creation of the symbolic link default 
 ( ~/tomcat/default - /opt/apache-tomcat-6.0.20 ) and you roll back
 to an older version the same way.

There is a much easier way: use the CATALINA_BASE environment variable.

 Maybe this principle works under MS-Windows as well. I read that MS is
 offering symbolic links since WinXP-SP2 but I have not much experience
 with their OS.

Such tricks are unnecessary if you use the ingenious mechanism provided
(and preferred) by the Tomcat devs.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksUJOgACgkQ9CaO5/Lv0PC6hwCfaJrD/fBgupdXaYyXchFnVMlk
xIgAn1FtYOpQp/XbDlLDpY+5l558sO36
=lsW/
-END PGP SIGNATURE-

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