Intrallect Intralibrary Installation Guide: Version 3.3

Intralibrary Installation Guide: Version 3.3


Revision: 8

Created: 4th August 2005

Last Revised: 8th June 2010

Contact: support@intrallect.com

Company: Intrallect Ltd

Product: intraLibrary, Digital Repository

Copyright: Intrallect Ltd 2003-2010. All rights reserved.

This document is made available to support Intrallect's customers and users of Intrallect's software. The text of these documents and the design of the intraLibrary software are both the intellectual property of Intrallect Ltd. Intrallect does not provide this document for any other purpose, and offer no warranty nor accept any liability for its use in any other context.


Table of Contents
1. Prerequisites
1.1. Java Environment
1.2. Database
1.3. Application Server
1.4. Installation Package
1.5. Internet Connection
1.6. Pre-Installation
2. Installation
2.1. IntraLibrary Web Application
2.2. Configuring Properties
2.3. Deploying the Licence
2.4. Configuring the intraLibrary Context
2.5. Configuring a Datasource
2.6. Copying Dependencies
3. Database Setup
3.1. Creating the Database
3.2. Populating the Database
3.3. Database Configuration
4. Confirming Installation
5. Setting the Application URL
6. Troubleshooting

1. Prerequisites
table of contents

1.1. Java Environment
table of contents

This version of intraLibrary relies on the Java 1.5 Runtime Environment. For this version of intraLibrary to function, it must be running under Java 1.5.

The full sdk must be installed and available on your server. The jre alone is not enough. The Java 1.5 sdk is available for many platforms here: http://java.sun.com/j2se/1.5/

IntraLibrary has been tested on the Windows, Linux and Solaris environments available from Sun and also on Apple's Java 1.5 implementation for Apple OS X.

Note that intraLibrary has not been tested on the Blackdown port of the JVM, the IBM JVM or any other JVM not mentioned above. If you have any experience deploying intraLibrary on any other platform or environment we'd like to hear from you.


1.2. Database
table of contents

IntraLibrary is designed to run using using the MySQL database server. You will require MySQL version 5.0 for this version of intraLibrary.

MySQL 5.0 is available for many platforms here: http://dev.mysql.com/downloads/mysql/5.0.html


1.3. Application Server
table of contents

IntraLibrary will run on any J2EE compliant Java Webserver adhering to the Servlet 2.4 specification and the JSP 2.0 specification, the rest of this document assumes that Tomcat 5.5.x is the application server being used. If you intend deploying intraLibrary on anything other than Tomcat, then follow the instructions from your application server vendor on how to deploy a web application. For help in deploying to a Servlet Container other than Tomcat 5.5.x contact a member of our support team.

If you want to make use of thumbnail functionality within intraLibrary, the server must be started with the java.awt.headless=true property. 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"

NOTE: We (and others!) have been experiencing strange behaviour when running Tomcat as a service on the Windows platform. In particular when allocating the minimum and maximum memory heap size. We cannot currently recommend running Tomcat as service using the Tomcat service installation tool. However some of our customers have had more success by creating a service manually. If you'd like help with this, contact a member of our support team.

NOTE: If you are installing Tomcat on Windows ensure that there are no spaces in the installation path as this can cause problems with the java class loader.


1.4. Installation Package
table of contents

If you're reading this, then you probably already have the intraLibrary 3.3 installation package. If you don't have the full installation package then please contact a member of the intrallect support team to organise this.

This package contains:


1.5. Internet Connection
table of contents

The intraLibrary web application needs access to the internet to perform some XML validation that occurs when using certain areas of functionality within intraLibrary.

The intraLibrary web application also needs to be able to send email from the application server. A valid, working and reachable smtp server must be defined. We will provide details on how to configure this later in the document.


1.6. Pre-Installation
table of contents

This installation guide assumes that Tomcat 5.5.x, MySQL 5.0.x and Java 1.5 have been correctly installed. We would recommend that you check both are working correctly before moving onto the installation of intraLibrary.


2. Installation
table of contents

2.1. IntraLibrary Web Application
table of contents

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

Once the web application is in place we can start to configure the properties to match your system.

Note: The intralibrary.war file is not designed to auto-deploy and you will experience problems if you place the file in the webapps directory of your Tomcat installation.


2.2. Configuring Properties
table of contents

All configurable aspects of intraLibrary (global properties, authentication, email content) are stored within a single config directory. This directory can be found at the root level of the installation package and should be copied to the filesystem somewhere (this can be anywhere on the file system). We strongly recommend that the directory is created outside of the webapp directory to ease the upgrade process in the future. The config directory should be accessible to the user that is used to start Tomcat. Once this directory has been copied we can go on to edit the global properties.

There are a number of properties that need to be defined in the config/intralibrary.properties file. The file supplied with the installation package contains some sample values.

The mandatory entries that need to be edited are:

The optional entries that may be added to the properties file are:


2.3. Deploying the Licence
table of contents

The licence file will be provided seperately to the intraLibrary application, if you don't yet have a licence please contact a member of our support team.

To deploy the licence and ensure that it will be picked up by your intraLibrary installation the file intralibrary-licence.txt should be placed at the root level of the config directory which you created in the previous section.


2.4. Configuring the intraLibrary context
table of contents

For the rest of this section we will refer to the root directory of your Tomcat installation as TOMCAT_HOME. As mentioned earlier in the documentation if your TOMCAT_HOME has spaces in the path you will experience problems, so try to avoid this.

The intraLibrary web application needs to be registered to allow the application server to run it. There are multiple ways of doing this but we recommend creating a context descriptor in $CATALINA_HOME/conf/[enginename]/[hostname]/.

More information about configuring contexts can be found here: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Included in this install package is a sample_context.xml file which you can use as a template for your installation. A brief explanation of some of the parameters follows below:


2.5. Configuring a Datasource
table of contents

NOTE: The following instructions are written specifically for creating a datasource using Tomcat 5.5.x, the MySQL 5.0.* database engine and the database driver we supply. If you need more help with this then please feel free to contact a member of our support team.

To enable the communication between the application and the database, we need to create a datasource. We do this by making changes to the context we created in the section above, either prior to adding the context to the server.xml file or once the context is in place.

Inside the context element discussed above, you'll find a Resource element. You will need to specify the following attributes on the Resource element to setup the datasource. More information about configuring a datasource using Tomcat 5.5 can be found here:http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html


2.6. Copying Dependencies
table of contents

NOTE: The following instructions are written specifically for using Tomcat 5.5.x.

The final part of configuring the datasource is to copy the following file from the install package dataSourceLib directory to TOMCAT_HOME/common/lib:

If you are prompted to overwrite any existing files, go ahead. You only live once!:

Although Tomcat already contains XML libraries, we need to make sure that the ones that are loaded are the ones that we need. To enable us to do this we make use of the ability to add jar files to an endorsed directory.

To achieve this you should copy the following files from the install package endorsed directory to TOMCAT_HOME/common/endorsed. Again if you are prompted to overwrite existing files then go ahead:

Certain parts of intraLibrary have been split out into independent modules, to allow intraLibrary to access these jar files and their dependencies need to be available within the common directory.

To achieve this you should copy the following files from the install package authenticationLib directory to TOMCAT_HOME/common/lib. Again if you are prompted to overwrite existing files then go ahead:

Some of the entry points to intraLibrary are protected by authentication as provided by the servlet container to allow this authentication to function correctly a custom realm must be provided.

To achieve this you should copy the following files from the install package realmLib directory to TOMCAT_HOME/server/lib. Again if you are prompted to overwrite existing files then go ahead:


3. Database Setup
table of contents

3.1. Creating the Database
table of contents

We need to create a database for the application to use. We do this by executing 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 we need to create a user for the application to connect to the database as 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 that were used when setting up the 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.2. Populating the Database
table of contents

We now need to create the database tables and populate these tables with the initial values that the application needs.

In the dbscripts folder, the main sql file that needs to be run to set up the database is: 'intralibrary.sql'.

There are a number of ways that this can be done. The easiest and most reliable is to connect to the database and from the database command line issue the following command:

source absolute/path/to/file; e.g. source /home/intralibrary/dbscripts/intralibrary.sql;


obviously replacing 'absolute/path/to/file' with the actual file path!

If you wish to add support for UKLomCore and CANCore application profiles, you should also run the uklomcore0p2.sql and cancore.sql files in this directory.


3.3. Database Configuration
table of contents

Although it is outside the scope of this documentation to go into a detailed discussion of database configuration, when using MySQL, the following advice may be useful.

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. Confirming Installation
table of contents

We should now be ready to restart the application server and confirm that the intraLibrary application is running.

The first thing we need to do is to make sure we can see or read the output from the application server. Depending on how you set up the context, this output could go to one of a few places. By default, Tomcat writes all its logging to files inside TOMCAT_HOME/logs. If you have used the supplied sample_context.xml file then the output file you should be interested in is catalina.out. [Note: on Windows systems this output file does not exist: output is written to the Tomcat console window.]

Before you start the server make sure you have included the licence file in the correct place.

If you start the server now, and your logging level is set to the correct details, you should see some output to the log file that resembles 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.company.intralibrary
repository name:intralibrary
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 installed intraLibrary 3.3.

If you don't see the output below then try browsing, through a web browser, to the newly defined context. If you see the intraLibrary login page then everything has been installed successfully

Now that you have a successful implementation of intraLibrary you can login using the username/password of intrallect/intrallect


6. Setting the Application URL
table of contents

Once the installation has been completed you should log in and set the application URL, this value is configured within the system section of the admin area (under 'System Options' tab) in the web interface.

The application URL determines the base url of the application e.g. http://localhost:8080/intralibrary and is used within the application when construction URLs are exposed outwith the web application e.g. URLs within SRU search results, RSS feeds, harvested result sets etc.

If this value is not set then intraLibrary's external facing interfaces will not be fully functional