Intralibrary Upgrade Guide: Version 2.9


Author: Intrallect Ltd

Company: Intrallect Ltd


intraLibrary IntraLibrary Upgrade Guide: Version 2.9

Table of Contents
1. Shutdown intraLibrary
2. Copy intraLibrary Database
3. Upgrade Platform
3.1. Install Java 1.5
3.2. Upgrade Application Server
3.2.1. Configure IntraLibrary Context
3.2.2. Configure IntraLibrary Datasource
3.2.3. Copy Dependencies
3.3. Upgrade MySQL
3.3.1. Create IntraLibrary Database
3.3.2. Populate Database
3.3.3. Configure Database
4. Replace Web Application
5. Remove Indexes
6. Configuring intraLibrary Properties
7. Ensure Complete Set of Email Templates
8. Copy Event Handling Configuration
9. Configuring Server Properties
10. Start intraLibrary

1. Shutdown intraLibrary

Shutdown the current instance of intraLibrary. If you are using Tomcat and are unsure about stopping and starting, see here for more help.


2. Copy intraLibrary Database

You must make a copy of your IntraLibrary database. If you are using MySQL and are not sure how to back up the database see here for details.


3. Upgrade Platform

IntraLibary 2.9 requires the Java 1.5 Runtime Environment and SDK, an application server adhering to the Servlet 2.4 and the JSP 2.0 specifications (e.g. Tomcat 5.5.x) and MySQL 5.0.x.



3.1. Install Java 1.5
3.2. Upgrade Application Server
3.2.1. Configure IntraLibrary Context
3.2.2. Configure IntraLibrary Datasource
3.2.3. Copy Dependencies
3.3. Upgrade MySQL
3.3.1. Create IntraLibrary Database
3.3.2. Populate Database
3.3.3. Configure Database

3.1. Install Java 1.5

If you are running an older version of Java it must be replaced with Java 1.5 to run IntraLibrary 2.9. The Java 1.5 sdk is available for most platforms from: http://java.sun.com/j2se/1.5/


3.2. Upgrade Application Server

IntraLibrary 2.9 requires a J2EE compliant application server adhering to the Servlet 2.4 and the JSP 2.0 specifications. We recommend the use of Tomcat 5.5.x which is available for download from: http://tomcat.apache.org/download-55.cgi



3.2.1. Configure IntraLibrary Context
3.2.2. Configure IntraLibrary Datasource
3.2.3. Copy Dependencies

3.2.1. Configure IntraLibrary Context

You need to configure the IntraLibrary context in the new application server. Instructions on how to configure the IntraLibrary context in Tomcat 5.5.x can be found in section 2.4 of the installation guide.


3.2.2. Configure IntraLibrary Datasoruce

You need to configure a datasource for IntraLibrary in the new application server. Instructions on how to configure a datasource for IntraLibrary in Tomcat 5.5.x can be found in section 2.5 of the installation guide.


3.2.3. Copy Dependencies

You need to copy dependencies from the install package dataSourceLib and endorsed directories. Instructions can be found in section 2.6 of the installation guide.


3.3. Upgrade MySQL

IntraLibrary 2.9 requires MySQL 5.0 which is available for download from: http://dev.mysql.com/downloads/mysql/5.0.html



3.3.1. Create IntraLibrary Database
3.3.2. Populate Database
3.3.3. Configure Database

3.3.1. Create Intralibrary database

Once you have successfully installed mysql 5.0 you need to create an intralibrary database on this version of mysql.

To create a database execute the following sql statement from the MySQL command line:

create database intralibrary;

You do not need to use the name intralibrary but the following instructions will assume you have.

Next create a user for the application to connect to the database and give that user the correct permissions. Here we are using the username/password of intrallect/intrallect. This can be set to anything you like but must match the values of your datasource.

grant all on intralibrary.* to intrallect identified by 'intrallect';

grant all on intralibrary.* to intrallect@'%' identified by 'intrallect'; On some database installations the wildcard ('%') does not work when connecting to the database from a machine which resolves as localhost. You can leave out this step if you are confident you can.

grant all on intralibrary.* to intrallect@'localhost' identified by 'intrallect';


3.3.2. Populate Database

You need to populate the database you have just created with the contents of your intralibrary database from your previous version of MySQL.

To do this, connect to the database and from the database command line issue the following command:

source absolute/path/to/your_copy_of_intralibrary_database; e.g. source /home/backups/intralibrary.sql;


Replace 'absolute/path/to/your_copy_of_intralibrary_database' with the actual file path to the backup you created of your database that ran on the previous version of MySQL!

3.3.3. Configure Database

As you did with your old instance of mysql, you will need to make some configuration changes

MySQL configuration lives in a file named either my.cnf or my.ini. Its name and location depends on the installed environment. The following parameters (and numerous others) can be set in this file and effect performance of intraLibrary and should be investigated. We've included some sample values which we've found to work well but your environment may differ. For more information see here:http://www.mysql.com/doc/en/MySQL_Database_Administration.html

Note:It is essential that the value for max_connections does not exceed the max_connections variable setup in the my.cnf(my.ini) file for the MySQL server. If you are unfamiliar with this configuration file look here:http://www.mysql.com/doc/en/MySQL_Database_Administration.html

IntraLibrary will not operate if the MySQL server has been configured with the STRICT_TRANS_TABLE mode switched on. To switch this mode off, remove any reference to STRICT_TRANS_TABLE for the configuration file and restart MySQL.


4. Replace Web Application

The basis of the intraLibrary web application is the intralibrary.war file file. You can put this archive anywhere on the server, but we'd recommended it to be on the same physical volume as the application server (Tomcat).

To avoid confusion between the new and old versions of the web application, rename the previous war file to intralibrary_old.war. Once you are satisfied that the new version of intraLibrary runs correctly the old war file can be removed completely.


5. Remove Indexes

While not essential, we strongly advise that you remove the index folder from within your intraLibrary config dir. There have been instances whereby the index has become out of sync with the contents of the intralibrary database. Removing this directory will prevent any inconsistencies.


6. Configuring IntraLibrary Properties

This release includes some new properties, if required these can be added to the intralibrary.properties file within your config directory. If you don't require any of the functionality specified below there is no need to add the new properties


7. Ensure Complete Set of Email Templates

Within the intraLibrary config directory there is an emailTemplates folder, ensure that this folder contains the following files. Note that each of these files should also appear in the language specific folders (e.g. en, es) within the emailTemplates directory.

If the contents of the emailTemplates directory (or any sub-folders) are incomplete, then you can copy the appropriate files from the emailTemplates folder provided as part of this distribution


8. Copy Event Handling Configuration

Within the intraLibrary config directory a new folder eventhandling should be created. This folder can be copied from the config directory within this distribution. Copy this folder into your local config directory to enable intraLibrary's default event logging.


9. Configuring Server Properties

There is some new functionality in in this release that includes graphic thumbnail functionality. If you want to make use of this functionality within intraLibrary, the server must be started with the java.awt.headless=true property. If using Tomcat, the easiest way to achieve this is to add the property to the catalina startup script (.sh or .bat) in the Tomcat bin directory:

JAVA_OPTS="-Djava.awt.headless=true"


10. Start intraLibrary

It's now time to start the application. The first time that intraLibrary is started, any database changes will be applied on the server to ensure compatibility with the new version. The database changes are fairly minor so the amount of time taken to upgrade should be small.

If you wish to monitor the upgrade process, you can monitor the upgradeReport.log file which can be found in the directory specified as 'configDir' in your properties file. This file will tell you when the process is finished by outputting the line 'finished upgrading'.

If you check the output of the server startup, you should see some text resembling the text below.

****************************************

populating learning object cache with 0 objects...
finished populating learning object cache

****************************************
application version: n.n (nnnnn)
database server version:5.0.27-community-nt
database url:jdbc:mysql://localhost:3306/intralibrary?autoReconnect=true&jdbcCompliantTruncation=false
database driver:MySQL-AB JDBC Driver
max database connections(0=unlimited):0
max upload file size:49Mb
servlet container:Apache Tomcat/5.5.20
java version:1.5.0_10
----------------------------------------
configDir location:/Volumes/projects/intralibrary/config
http proxy:no proxy used
mail host:mail.company.com
admin email:admin@company.com
error email:errors@company.com
return email:intralibrary1@company.com
id prefix:com.comapany.intralibrary1
repository name:intralibrary1
object cache size:250
entry page:browse
debug:false
reindexOnStartup:true
----------------------------------------
total memory assigned:26Mb
maximum memory assigned:112Mb
----------------------------------------
licence assigned to:company
max contributors:10
current contributors:1
expires:
----------------------------------------
IntraLibrary started dd-MMM-yyyy hh:nn:ss
****************************************

Assuming that you have no errors in this output then congratulations, you have successfully upgraded your installation of intraLibrary.