GraphDB-Lite Installation

Version 1 by barry.bishop
on Jul 01, 2013 14:29.

compared with
Version 2 by dimitar.manov
on Jul 17, 2014 17:41.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (31)

View Page History
This section is for users and system administrators that are unfamiliar with the OWLIM-Lite GraphDB-Lite semantic repository software. The information contained in the following pages should be enough to get started with OWLIM-Lite, GraphDB-Lite, i.e. to install and configure the software so that repository instances can be created and used.

{toc}
h1. Usage scenarios

OWLIM-Lite GraphDB-Lite is packaged as a Storage and Inference Layer (SAIL) for the [Sesame RDF framework|http://www.openrdf.org/]. OWLIM-Lite GraphDB-Lite can be used in two different ways:
* *Library:* One approach is to integrate OWLIM-Lite GraphDB-Lite in an application using it as a library. An example of doing this is given in the 'getting-started' folder of the OWLIM-Lite GraphDB-Lite distribution zip file. Users intending to use OWLIM-Lite GraphDB-Lite in this way do not need to install the Sesame Web applications (Server and Workbench) and need only set a few environment variables as detailed in the [configuration section of the OWLIM-Lite GraphDB-Lite user guide|OWLIM-Lite guide|GraphDB-Lite Configuration#Getting-Started Application].
* *Server:* Those users wishing to use OWLIM-Lite GraphDB-Lite via the Sesame Server, with or without the Sesame Workbench, should proceed with one of the two approaches detailed in this section. This will cover installing Sesame and integrating OWLIM-Lite GraphDB-Lite in to the Sesame framework, so that OWLIM-Lite GraphDB-Lite can be used as a plug-in repository type. This approach involves deploying Sesame/OWLIM-Lite Sesame/GraphDB-Lite via a servlet server, such as Tomcat. The Sesame installation comes with a useful 'workbench' Web application that can be used for many administration tasks.

The rest of this section gives detailed step by step instructions for installing and configuring Sesame and OWLIM-Lite, GraphDB-Lite, leading up to the creation of an OWLIM-Lite GraphDB-Lite repository using the Sesame console (a command line script). For more information please check the "doc" folder of the OWLIM-Lite GraphDB-Lite distribution zip file.

h1. Easy install

OWLIM GraphDB will normally be built against the latest version of the [Aduna OpenRDF Sesame framework|http://www.openrdf.org/]. If using OWLIM GraphDB with this version then the easiest way to deploy an OWLIM GraphDB server instance is to copy the re-packaged Sesame Web applications (.war files) in to the Tomcat {{webapps}} directory. These can be found in the {{sesame_owlim}} directory in the OWLIM GraphDB distribution ZIP file. These Web applications have been modified as follows:

* *openrdf-sesame.war:* The Sesame server application. All OWLIM-Lite GraphDB-Lite and 3{^}rd^ party jar files have been added to this package, so that it can be used immediately after deployment.
* *openrdf-workbench.war:* The OWLIM-Lite GraphDB-Lite jar, XSLT configuration code and an OWLIM-Lite GraphDB-Lite Turtle configuration file have been added, so that new OWLIM-Lite GraphDB-Lite instances can be created using the Workbench without the need to run the command line console application.

After deployment, an OWLIM-Lite GraphDB-Lite instance can be created using the workbench application as follows:
* Start a browser and go to the Workbench Web application using a URL of this form: [http://localhost:8080/openrdf-workbench/] \- substituting {{localhost}} and the {{8080}} port number as appropriate.
* Click 'change server' if necessary to select a Sesame server instance if it is running on a different machine. The server URL will be of this form: [http://localhost:8080/openrdf-sesame]
* After selecting a server, click 'New repository'
* Select 'OWLIM-Lite' 'GraphDB-Lite' from the drop-down and enter the repository ID and description. Then click 'next'.
* Fill in the fields as required and click 'create'.
* A message should be displayed that gives details of the new repository and this should also appear in the repository list (click 'repositories' to see this).
h1. Longer install

This longer install process should be used when a different or modified version of Sesame is being used. In this case, all the OWLIM-Lite GraphDB-Lite files needs to be installed alongside Sesame in a step-by-step process as follows.

h2. Preparation

A suitable application server must be installed. The examples in this guide assume [Apache Tomcat|http://tomcat.apache.org/] version 6.x is used. Importantly, the user must have sufficient privileges to write to the Tomcat webapps directory and to stop and start the Tomcat daemon.
An [OWLIM-Lite|http://www.ontotext.com/owlim/] [GraphDB-Lite|http://www.ontotext.com/owlim/] distribution is required. This is published as a zip file. The examples in this guide use version 5.4.
The [Aduna OpenRDF Sesame framework version 2.7|http://www.openrdf.org/] is required for the longer installation. The examples in this guide use version 2.7.2.

{note}Another application server can be used instead of Tomcat. However, the rest of this guide will describe the installation of OWLIM-Lite GraphDB-Lite with this software.
{note}No part of this guide is intended to supersede the documentation published with these 3{^}rd^ party software components and the reader is strongly advised to familiarise himself/herself with these.

Assuming that an instance of Tomcat is available, the installation proceeds as follows:
* Install and deploy Sesame
* Install OWLIM-Lite GraphDB-Lite and deploy the OWLIM-Lite GraphDB-Lite jar file
* Add the OWLIM-Lite GraphDB-Lite repository template file to the Sesame console configuration
* Use the Sesame console to create a new repository.

* Locate the Tomcat webapps directory, hereafter called \[WEBAPPS\].
* Unzip the Sesame 2 distribution zip file. The Sesame 'root' directory will be called \[SESAME\].
* Unzip the OWLIM-Lite GraphDB-Lite distribution. The top level unzipped directory will be called \[OWLIMLITE\]. \[GraphDBLITE\].
* Deploy the Sesame Web applications by copying the war files in \[SESAME\]/war to \[WEBAPPS\].

"%APPDATA%\Aduna\OpenRDF Sesame console" (Windows)
{noformat}
* Create the 'templates' folder here and copy the OWLIM-Lite GraphDB-Lite repository template to it. This file is found here: {{\[OWLIMLITE\]/templates/owlim-lite.ttl}} {{\[GraphDBLITE\]/templates/owlim-lite.ttl}}
* Copy the OWLIM-Lite GraphDB-Lite jar file to Sesame console and Sesame server, i.e. from {{\[OWLIMLITE\]/lib}} {{\[GraphDBLITE\]/lib}} to {{\[SESAME\]/lib}} and {{\[WEBAPPS\]/openrdf-sesame/WEB-INF/lib}}
* Restart Tomcat
* Run the Sesame console {{\[SESAME\]/bin/console.sh (.bat)}}
* And exit: {noformat}quit .{noformat}
* Create the Sesame console's templates directory: {noformat}mkdir $HOME/.aduna/openrdf-sesame-console/templates{noformat}
* Unzip the OWLIM-Lite GraphDB-Lite distribution: {noformat}unzip owlim-lite-5.*.zip{noformat}
* Copy the OWLIM-Lite GraphDB-Lite repository template file to the Sesame console templates directory: {noformat}cp owlim-lite-5.*/templates/owlim-lite.ttl $HOME/.aduna/openrdf-sesame-console/templates/{noformat}
* Copy the OWLIM-Lite GraphDB-Lite jar file to the Sesame console and Sesame server lib directories:
{noformat}cp owlim-lite-5*/lib/owlim-lite-5*.jar openrdf-sesame-2.*/lib/
cp owlim-lite-5*/lib/owlim-lite-5*.jar /var/lib/tomcat6/webapps/openrdf-sesame/WEB-INF/lib
* And exit with: {noformat}quit .{noformat}
* Create the Sesame console's templates directory: {noformat}mkdir "%APPDATA%\Aduna\OpenRDF Sesame console\templates"{noformat}
* Unzip the OWLIM-Lite GraphDB-Lite distribution: {noformat}unzip owlim-lite-5*.zip{noformat}
* Copy the OWLIM-Lite GraphDB-Lite repository template file to the Sesame console templates directory: {noformat}copy owlim-lite-5.4.6200\templates\*.ttl "%APPDATA%\Aduna\OpenRDF Sesame console\templates"{noformat}
* Copy the OWLIM-Lite GraphDB-Lite jar file to the Sesame console and Sesame server lib directories:
{noformat}
copy owlim-lite-5.4.6200\lib\owlim-lite-5*.jar openrdf-sesame-2.7.2\lib
{noformat}[ADUNA_DATA]/openrdf-sesame/conf/logback.xml{noformat}

OWLIM GraphDB also uses SLF4J for logging and the distribution includes the SLF4J-to-Java-logging mapping jar file. The repackaged openrdf-sesame war file that comes with OWLIM GraphDB does not have this mapping, so in this case OWLIM GraphDB logs as Sesame does to the logback framework.

Tomcat uses log4j and the logging details can set up by editing this file (on Linux):
h1. Common Problems

h4. Can not copy OWLIM-Lite GraphDB-Lite jar file to the Sesame WEB-INF/lib directory.

This directory will not exist until the Sesame war files have been deployed to the \[WEBAPPS\] directory AND Tomcat is running. If the war files have been deployed, but the directory does not exist, try restarting Tomcat.
Make sure that the Sesame war files have been deployed and that Tomcat is running. Restart Tomcat if necessary.

h4. Can not create a OWLIM-Lite GraphDB-Lite repository using the Sesame console

Make sure that the repository template file \[OWLIMLITE\]/templates/swiftowlim.ttl \[GraphDBLITE\]/templates/swiftowlim.ttl has been copied to the 'templates' subdirectory of the Sesame console's data directory.

h4. Can not create a OWLIM-Lite GraphDB-Lite repository, the Sesame console says unknown Sail type -- owlim:Sail

The Sesame console can not find the OWLIM-Lite GraphDB-Lite jar file. Make sure it was copied from \[OWLIMLITE\]/lib \[GraphDBLITE\]/lib to the Sesame installation folder here: \[SESAME\]/lib

h4. Cannot use my custom rule file (pie file), an exception occurred
h4. A repository can be created using the openrdf console, but any operation using this repository results in a long error message

Make sure that the OWLIM GraphDB jar file has been copied to the Sesame Web application's WEB-INF/lib directory.

h4. Sesame Workbench starts, but gives memory error on the 'explore' and 'query' menus