# Setting up an Ontop SPARQL endpoint with Ontop CLI
- Download Ontop CLI (opens new window) and unzip it to a directory, which is denoted as
$ONTOP_CLI_DIR
below. - Copy the H2 jdbc driver to
$ONTOP_CLI_DIR/jdbc
(if not done yet)- Mac/Linux:
cp jdbc/h2-1.4.196.jar $ONTOP_CLI_DIR/jdbc
- Mac/Linux:
- Start the h2 database.
- Go to the
endpoint/
directory. Alternatively, if you don't have already the tutorial files, you can download this OWL ontology file, this mapping file, this properties file and paste them ininput/
. - Start the Ontop endpoint. On Mac/Linux:
$ONTOP_CLI_DIR/ontop endpoint \
--ontology=input/university-complete.ttl \
--mapping=input/university-complete.obda \
--properties=input/university-complete.properties \
--cors-allowed-origins=http://yasgui.org # if needed
On Windows:
ontop endpoint ^
--ontology=input/university-complete.ttl ^
--mapping=input/university-complete.obda ^
--properties=input/university-complete.properties ^
--cors-allowed-origins=http://yasgui.org
- Open the web interface of the SPARQL endpoint to try some queries: http://localhost:8080/ (opens new window)