Setting Up a DBpedia mirror

How to setup a DBpedia mirror on Virtuoso?

Deployment system specifications (used here):

  • Ubuntu 12.04
  • Quad-Core @ 3.4 GHz
  • 8 GB RAM
  • X disk space

Step 1: Installing Virtuoso

You can go to the Openlink Virtuoso website and download or buy the Virtuoso server to install it on your machine. On Ubuntu 12.04, however, we can install the (opensource) Virtuoso server through the package manager. Command-line:

~$ sudo apt-get install virtuoso-server

Step 2: Download DBpedia data

On, data dumps can be downloaded of different versions of DBpedia for different languages. Here, version 3.8 (most recent at the time) and English are chosen.

  1. Go to the download page for your version and language (in our case,
  2. Download all archives ending with “nt.bz2” in one folder on your machine. Let’s call this folder dumpfolder.
    1. this doesn’t have to happen manually, you can also use the following command on Linux from dumpfolder:
    • wget -r -np -nd -nc -A'*.nt.bz2'
  3. Download the DBpedia Ontology

Step 3: Prepare for importing DBpedia dumps

  1. transform b-zipped dumps to gzip (saves space):
    • ~$ for i in *.bz2 ; do bzcat $i | gzip --fast > ${i%.bz2}.gz && rm $i ; done &
  2. clean DBpedia dumps:
  • ~$ for i in external_links_en.nt.gz page_links_en.nt.gz infobox_properties_en.nt.gz ; do   echo -n “cleaning $i…”   zcat $i | grep -v -E ‘^<.+> <.+> <.{1025,}> \.$’ | gzip –fast > ${i%.nt.gz}_cleaned.nt.gz &&   mv ${i%.nt.gz}_cleaned.nt.gz $i   echo “done.” done
  1. import loading scripts

Step 4: import data

This is the longest step. It may take hours (depending on how much you import)

ld_dir_all(<folder with dumps>, '*.*', '');

Run the loader:

commit WORK;



One thought on “Setting Up a DBpedia mirror

  1. Pingback: Installing DBpedia Virtuoso plugin | DBpedia Viewer

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s