OrderlyStats SE Major Upgrade Procedure

This document describes the softare upgrade procedure for major system component
changes.  You will need to follow this procedure if you have a pre-11.2a version
of OrderlyStats SE.

11.2a contains new versions of the Java (1.7u13), Tomcat (7.0.35) and 
HSQLDB (2.2.9) components.  It is backwards-compatible with old versions of HSQLDB
that you may have installed already, but NOT with old versions of Tomcat or Java.

NOTE: the pre-11.2a version of webapps/orderlystatsse/WEB-INF/web.xml is 
INCOMPATIBLE with Tomcat 7, so DO NOT copy your old file across from your old
installation. It won't work! If you have changed this file, then please 
edit/modify the new version included in the update instead.

So, to upgrade:

1) Stop OrderlyStats SE:
/etc/init.d/orderlystatsse stop

2) Move your old OrderlyStats SE installation out of the way:
mv /usr/share/orderly /usr/share/orderlyOLD

3) Download and install the NEW All-In-One distribution:
cd ~
wget http://us3.orderlyq.com/orderlystatsse-all-in-one-64bit-11.2a.tar.gz
tar -xvzf orderlystatsse-all-in-one-64bit-11.2a.tar.gz
cd orderlystatsse
./install.sh

NOTE: There is also a 32 bit version available. Check which you need by running
uname -a

4) Stop OrderlyStats SE (again).
/etc/init.d/orderlystatsse stop

5a) If you ARE still using HSQL, then now would be a good time to consider migrating
to MySQL or PostgreSQL, as we no longer recommend HSQL for production environments.
If you are NOT using HSQL, skip to 6) below.
If you do need to continue using HSQL, then proceed as follows:

rm -rf /usr/share/orderly/hsqldb
cp -rf /usr/share/orderlyOLD/hsqldb /usr/share/orderly

5b) If you ARE NOT still using HSQL, you will need to copy across the driver files for
your database from your old installation to the new installation.

cp /usr/share/orderlyOLD/tomcat/shared/lib/post* /usr/share/orderly/tomcat/lib
cp /usr/share/orderlyOLD/tomcat/shared/lib/mysql* /usr/share/orderly/tomcat/lib

NOTE that the libary folder configuration in Tomcat 7 is different - tomcat/shared/lib
has been replaced by tomcat/lib

6) If you have configured daily update emails, or changed the port on your tomcat
installation, you may need to reinstall mail.jar and/or replicate your changes in
/usr/share/orderly/tomcat/conf/web.xml and /usr/share/orderly/tomcat/conf/server.xml
Please see the manual for further details on daily update emails.

7) Copy your configuration file from your old installation to your new installation:
cp -f /usr/share/orderlyOLD/tomcat/webapps/orderlystatsse/WEB-INF/OrderlyStatsSE.xml /usr/share/orderly/tomcat/webapps/orderlystatsse/WEB-INF

8) If you have made any changes to the OrderlyStats SE web.xml file since installing,
you will need to reapply them to the new web.xml file as the file format has changed
for Tomcat 7, so uncomment any relevant sections of 
/usr/share/orderly/tomcat/webapps/orderlystatsse/WEB-INF/web.xml

9) Start OrderlyStats SE
/etc/init.d/orderlystatsse start

Don't forget to let us know if you run into any trouble - we're here to help.
support@orderlyq.com

