Fuseki is very easy to setup
- Download latest jena-fuseki distribution tarball from http://www.apache.org/dist/jena/binaries/
- Unpack the download archive
- Start fuseki-server
Note: The "fuseki-server" command above runs completely in-memory. No triples will be persisted. This is great for test, but not recommended for a production installation. See: http://jena.apache.org/documentation/serving_data/index.html
Fuseki should be running at http://localhost:3030/
If you want to change the port on which Fuseki runs, you can add the "–port" option to the run command (e.g. ./fuseki-server --port 3131 --update --mem /test).
To access the SPARQL query form, go to http://localhost:3030/control-panel.tpl and select your datasource (in this case /test).
- This allows you to perform SPARQL queries or updates, or upload an RDF file to replace the contents of the triplestore.
Sesame requires a little more setup to run with the tests, since by default it uses the same port as Fedora. To setup Sesame with Tomcat running on an alternate port:
- Download Tomcat from http://tomcat.apache.org/download-70.cgi and unpack the downloaded archive.
- Edit the Tomcat configuration file (
apache-tomcat-7.0.59/conf/server.xml) to use a different port (e.g., 8081 instead of 8080).
- Download Sesame from http://sourceforge.net/projects/sesame/files/Sesame%202/
- Unpack Sesame and move the Sesame WAR file into the Tomcat webapps directory, then start Tomcat.
Sesame should now be running at: http://localhost:8080/openrdf-sesame/system/overview.view
Before you can load data or perform queries, you must create a repository. You can do this using OpenRDF Workbench, a companion webapp to Sesame which provides the ability to manage repositories, perform SPARQL queries, etc. To deploy this webapp, copy the OpenRDF Workbench WAR file to the Tomcat webapps directory:
Then you can create a new repository at http://localhost:8081/openrdf-workbench/repositories/NONE/create, and query the test repository at http://localhost:8081/openrdf-workbench/repositories/test/query.
Alternatively, you can use the Sesame console application to create a repository from the command line:
- You may need to set the Sesame data directory in your Tomcat7 configuration (e.g. /etc/default/tomcat7)
By default, Sesame will allow any connection to perform any operation, including adding and deleting triples or Sesame repositories. Since Sesame runs in a standard Java Servlet container, you can configure access control
- Tomcat supports a variety of authentication systems. For this example, we'll edit the configuration file of the default authentication system that uses a plaintext XML file to store usernames and passwords. Edit
apache-tomcat-7.0.59/conf/tomcat-users.xml, adding this line inside the
tomcat-userselement (making sure it's not in the commented-out examples):
- Restart Tomcat for the username and password changes to take effect.
- When creating repositories using the Sesame console, specify the username and password when connecting:
apache-tomcat-7.0.59/webapps/openrdf-sesame/WEB-INF/web.xmland add the following security configuration inside the
web-appelement, replacing "test" in the
url-patternelement with the name of your repository:
- Read operations will work without authorization, but creating/deleting Sesame repositories, or adding/delete triples, will require a username/password.
See Basic Security with HTTP authentication for more info on using container access control with Sesame, including requiring a separate account for read operations.