Skip to content
Steven Anderson edited this page May 5, 2017 · 8 revisions

Install Blazegraph under Tomcat

Development Blazegraph

You can use ldfjetty in your ruby project. To use this, add the following to your gemfile:

gem 'ldfwrapper', github: 'boston-library/ldf-wrapper', branch: "master"

Once installed, you can do the following to install and then control an instance:

rake ldfjetty:install

rake ldfjetty:start

rake ldfjetty:config

rake ldfjetty:stop

A marmotta and blazegraph instance should be available at: http://localhost:8988. For further information, see https://github.com/ActiveTriples/linked-data-fragments#blazegraph or https://github.com/boston-library/ldf-wrapper

Production Blazegraph

wget https://downloads.sourceforge.net/project/bigdata/bigdata/2.1.4/blazegraph.war?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fbigdata%2Ffiles%2Fbigdata%2F2.1.4%2F&ts=1490662771&use_mirror=cytranet

  • Rename to <whatever_you_want_the_app_called>.war. I'll use an example of blazegraph.war for this.

  • Move the war file into: /var/lib/tomcat7/webapps

  • Give correct permissions to the war file

  • Restart tomcat and blazegraph should be accessible at: /blazegraph

Install TGN Vocabulary

Warning: This is a 40 GB dataset. This can take over a day to post.

  • Get the full vocabulary download and unzip it:

    wget http://vocab.getty.edu/dataset/tgn/full.zip

    unzip full.zip

  • Push the content to Blazegraph under the context of something like http://vocab.getty.edu/tgn. This command should be like:

curl -H 'Content-Type: text/turtle' --upload-file TGNOut_Full.nt -X POST "http://localhost/blazegraph/sparql?context-uri=http://vocab.getty.edu/tgn"

  • Once complete, verify that it is loaded by going to Blazegraph and looking for the uri: http://vocab.getty.edu/tgn/2507399 in the Explore tab. If it shows incoming and outgoing links, it is successfully loaded.

Install AAT Vocabulary

  • Get the full vocabulary download and unzip it:

    wget http://vocab.getty.edu/dataset/aat/full.zip

    unzip full.zip

  • Push the content to Blazegraph under the context of something like http://vocab.getty.edu/aat. This command should be like:

curl -H 'Content-Type: text/turtle' --upload-file AATOut_Full.nt -X POST "http://localhost/blazegraph/sparql?context-uri=http://vocab.getty.edu/aat"

  • Once complete, verify that it is loaded by going to Blazegraph and looking for the uri: http://vocab.getty.edu/aat/300312143 in the Explore tab. If it shows incoming and outgoing links, it is successfully loaded.

To Delete A Vocabulary

One may have loaded a vocabulary incorrectly or need to clear out a loaded vocabulary to load in a newer version. Below is a sample command for removing all of the TGN triples by using their context:

curl --get -X DELETE -H 'Accept: application/xml' 'http://localhost/blazegraph/sparql' --data-urlencode 'c=<http://vocab.getty.edu/tgn>'