Table of Contents
Sesame can deployed in several ways. The two most common scenarios include deployment as a java library, or deployment as a server. In this chapter, both installation scenarios are explained.
To use Sesame as a library in a java application, one needs the Sesame jar file sesame.jar. This file can be found in the lib/ directory of the binary download. Simply including this jar file in your classpath will allow you to use the functionality of Sesame in your own Java application.
Sesame requires Java 2, version 1.4 or newer, to function properly.
For more information on how to use Sesame as a library, see Chapter 7, The Sesame API
The Sesame server requires the following software:
Sesame has several options for storage of RDF data: it can store data in main-memory (optionally with a dump to file), it can store data directly in files, or it can store data in a relational database. For the last option, Sesame installation additionally requires the presence of a DBMS with a JDBC-driver. Currently, PostgreSQL, MySQL, MS SQL Server and Oracle databases are supported. The former two DBMS's are open source and are freely available on the Internet. What follows is a description of necessary actions to get a Sesame server up-and-running.
The following steps describe the easiest procedure to install Sesame on Tomcat 4.x or 5.x. The described procedure doesn't require any reconfiguration of Tomcat itself, but it might not be the best option for you. Please see the documentation that came with your copy of Tomcat if you want more fine-grained control over where and how Sesame should be installed.
If you have performed all of the steps described above, Sesame should now be ready. Make sure that your servlet container runs the (updated) Sesame code. For some servlet containers this means that you have to stop and (re)start it. Pointing a browser to the location where you have installed Sesame (e.g. http://[MACHINE_NAME]:8080/sesame/ if you have installed Sesame as described in this document) should now display the Sesame web interface.
You should also test whether the Sesame servlets are running correctly, and whether Sesame can talk to the DBMS (if applicable). Select one of the repositories that you have just configured and press 'Go>>'. Click on the 'Add (www)' link in the toolbar at the top of the window, and try to upload the test.rdf file from Sesame's admin directory (e.g. http://[MACHINE_NAME]:8080/sesame/admin/test.rdf). You can do this by typing this URL in the first text field and by clicking on the 'Add data' button after that.
If the data-upload was a success, you should also be able to extract the uploaded data. Click on the 'Extract' link in the toolbar and press the 'Extract' button. This should yield an RDF document describing all classes and properties in the repository.
Sesame has been successfully installed if all of this works. You can remove or reconfigure the test user account and repository if you want. If you haven't done so already, you can take a look at the next chapter for information on how to add and remove user accounts and repositories to/from Sesame.
Installation of Sesame under Tomcat 3 is almost identical to the procedure described above. It requires one additional step:
Sesame has been tested with OC4J v9.0.3.0. The installed procedure differs from the standard installation procedure.
<param-name>org.xml.sax.parser</param-name> <param-value>oracle.xml.parser.v2.SAXParser</param-value> [...] <param-name>org.xml.sax.driver</param-name> <param-value>oracle.xml.parser.v2.SAXParser</param-value>
<web-module id="sesame" path="../../home/applications/sesame"/>
<web-app application="default" name="sesame" root="/sesame"/>
Sesame Server is extensively tested in combination with Apache Tomcat. Additionally, it has been reported to work with OC4J (see the previous section for configuration details) and with BEA WebLogic 8.1 SP2.
So far, we have no experience with installing Sesame under other servlet containers. Installation will probably be very similar to installation under Tomcat. Please check the documentation for your servlet container on how to install a Java web archive.
If you have successfully installed Sesame under another servlet container, then please share any container-specific installation quirks with us so that we can include the procedure in this document.
In most cases, Sesame depends on a DBMS for storing the RDF data. Currently, Sesame is able to use PostgreSQL, MySQL, Oracle (9i or newer) and SQL Server. Both PostgreSQL and MySQL are distributed under an Open Source license. These databases can be downloaded from www.postgresql.org and www.mysql.com, respectively. Please check the documentation delivered with these databases for any questions on how to get them installed.
In general Sesame performs better with MySQL than with PostgreSQL. We have no data on its performance with Oracle or SQL Server.
If you wish to use Sesame using the main-memory storage, installation of a DBMS is not required.
GRANT ALL ON <DATABASE>.* TO <USER>@localhost;See http://www.mysql.com/doc/G/R/GRANT.html for MySQL's syntax of GRANT. We'll assume that the user is called 'sesame' in the rest of this document.
Sesame should be able to run on any Java servlet container that supports the Servlet 2.2 and JSP 1.1 specifications, or newer. So far, it has been tested with Tomcat and, in the case of Oracle, with OC4J. It has also been reported to work without problems on BEA WebLogic 8.1 SP2. Please post any reports about compatibility with other servlet containers to our forums.
Tomcat is distributed under the Apache Software License, which is an open source license. It is being developed as part of the Jakarta Project. Tomcat can be downloaded from jakarta.apache.org. We suggest that you use version 4 or 5 of Tomcat, as its configuration is much easier than that of older Tomcat versions (i.e. version 3).
To run Tomcat, you'll also need a Java 2 SDK. Java 2 SDK's are available for most mainstream platforms. JSDK's for Microsoft Windows, Linux x86 and Solaris can be downloaded from java.sun.com/j2se/. Please note that Tomcat requires the Java 2 SDK to be able to parse JSP pages. Sesame's JSP pages will not work if you use the Java 2 Runtime Environment.
Installation of both the JSDK and Tomcat should be straightforward. Please see the installation manuals of both software packages if you have any questions about their installation.