Apache Jena Fuseki
Install and configure a self-managed Apache Jena Fuseki server for development and testing purposes.
Apache Jena is an open-source Java framework for building semantic web and linked data applications. Apache Jena Fuseki is a SPARQL server that exposes the RDF data stored in the triplestore via HTTP and a REST-style API. This page provides instructions on how to install and configure a self-managed Apache Jena Fuseki server for development and testing purposes only (i.e. non-production).
This page provides instructions on how to install and configure a self-managed Apache Jena Fuseki server for development and testing purposes only. To configure a secure production-ready instance of Apache Jena server, please refer to the Fuseki documentation.
The instructions below are for Ubuntu 20.04. Installation instructions for other Linux distributions and Windows are almost identical (assuming that Java is installed) as Apache Jena and Apache Jena Fuseki server is a Java-based triplestore service.
To install Apache Jena Fuseki, simply download the Apache Jena Fuseki binary distribution (apache-jena-fuseki-*.tar.gz) from https://jena.apache.org/download and unpackage the downloaded archive file into a directory of your choice. In our case, we shall unpackage the Apache Jena Fuseki binary distribution into
/opt/apache-jena-fuseki/apache-jena-fuseki-4.3.1
.To define a username and password combination to authenticate client requests using Basic Authentication, navigate to the Apache Jena Fuseki installation directory and edit
run/shiro.ini
as follows:[users]
guest=password123
[urls]
/$/** = authcBasic,user[guest]
/** = anon
The example configuration above defines a new user called
guest
with the password password123
. Thereafter we configure all requests to the /$/**
wildcard path to require basic authentication and authorized with the credentials of the newly defined guest
user. Requests to all other resources, defined by the /**
wildcard path, are configured with anonymous access.To configure Apache Jena Fuseki server to persist RDF triplestore data to disk, and hence persist triplestore across server restarts, we can use the
--loc
parameter when starting Fuseki server as follows:# Navigate to the Fuseki installation directory
cd /opt/apache-jena-fuseki/apache-jena-fuseki-4.3.1
# Run Fuseki server using disk-based storage
./fuseki-server --loc=/opt/apache-jena-fuseki/apache-jena-fuseki-4.3.2/data --update /ontopop
The command above starts Fuseki server using TDB2 transactional disk-based storage where RDF triplestore data is persisted in the directory defined by the
--loc
parameter, and the optional --update
parameter enables updates to the RDF triplestore data via SPARQL (including SPARQL via HTTP).After starting Apache Jena Fuseki server with default settings using the command above, the server will listen for requests at http://localhost:3030.
To configure OntoPop to use Apache Jena Fuseki, please configure the storage.triplestore namespace in application.yml as follows:
Property | Description | Example Value |
---|---|---|
service | The name of the RDF triplestore service used by OntoPop. Currently only apache-jena is supported. | apache-jena |
apache-jena.fuseki.url | If using Apache Jena, the URL to the Apache Jena Fuseki server. Note that the URL should be set as an externalized variable and NOT stored as plaintext in application.yml. | http://localhost:3030 |
apache-jena.fuseki.username | The username to use as part of basic authentication requests to the Fuseki server. Note that the username should be set as an externalized variable and NOT stored as plaintext in application.yml. | guest |
apache-jena.fuseki.password | The password to use as part of basic authentication requests to the Fuseki server. Note that the password should be set as an externalized variable and NOT stored as plaintext in application.yml.
| password123 |
For further information regarding configuring Apache Jena Fuseki server, please visit https://jena.apache.org/documentation/fuseki2/index.html. And for further information regarding the endpoints exposed by Fuseki server, including executing SPARQL queries via HTTP, please visit https://jena.apache.org/documentation/fuseki2/soh.html.
Last modified 11mo ago