Installing Virtuoso

Printer-friendly version

How to install Virtuoso?

Author(s): Tim Lebo 2012-02-04 (updated 2012-06-12) (Thanks to Shangguan and Greg Williams)

  • Get the source code and cd into the uncompressed directory (per VOSDownload)
  • Make sure you have the dependencies (per VOSMake)
  • Install
    • Set compiler flags. (e.g. export CFLAGS="-O2 -m64" for "typical" 64 bit linux machines. (OS-specific flags listed at VOSMake). The unix command uname -a will indicate which flavor of unix you are running.
    • Run ./configure with the appropriate arguments:
      • To override the default install directory (/usr/local/), use ./configure --prefix=/path/to/dir (per VOSMake)
      • To also rename Virtuoso's isql command to isql-v, use ./configure --program-transform-name="s/isql/isql-v/" (per VOSMake)
    • Run make
    • Run make install (if you used --prefix above, reuse it again here, e.g. make install prefix=/path/to/dir) (per VOSMake)
    • See the directories installed at /usr/local (or wherever you specified with --prefix and prefix above) (per VOSMake)
    • Run make check to test the installation (per VOSMake)
  • Once installed, VOSStart provides some pointers on what to do with a new installation.
    • If you want to publish csv2rdf4lod RDF conversions with virtuoso, see this wiki page to tell csv2rdf4lod how to talk to the virtuoso server.
  • Start the server
    • cd var/lib/virtuoso/db
    • Although virtuoso-t -f & will get you up and running (per VOSMake), we recommend copying the virtuoso.ini file to a project-specific location, tailoring it to project-specific paths/ports/passwords/etc., and starting the virtuoso server with virtuoso-t -f -c /path/to/project/config/triple-store/virtuoso/virtuoso.ini &. This way, multiple projects can use the same virtuoso server executables without conflict.
  • Monitor the server
    • tail -f /opt/virtuoso/var/lib/virtuoso/db/virtuoso.log will show the latest logs from the server. The path of the log depends on --prefix at ./configure time and the log variable in the virtuoso.ini file (specified with the -c argument to virtuoso-t).
  • Visit the SPARQL endpoint at http://HOST:PORT/sparql (the default PORT is 8890, which is set in virtuoso.ini's ServerPort variable).
  • If you want to expose the endpoint through apache, try in your /etc/apache2/httpd.conf:
    • ProxyPass /virtuoso http://HOST:PORT/
    • ProxyPassReverse /virtuoso http://HOST:PORT/
  • VirtDumpLoadRdfGraphs describes how to dump the contents of the store. It does not support n-quads, instead makes a directory and creates separate files for each named graph. Note that you have to paste the functions into isql-v BEFORE you call them. They are not defined for you already.
  • Shut down the server
    • /optl/virtuoso/bin/isql 1111 DBA-USERNAME DBA-PASSWORD -K is the best way.
    • Killing the thread in ps -ef | grep virtuoso is less desirable, but it works. The store might become unreliable, though.

see also:

Errors and how to handle them

"Failed to get a buffer for a new page. Retrying. If the failure repeats, an out of disk error will be signalled..." error [ 1 ]

This error msg usually indicates an already existing virtuoso instance
running. You could do a "ps -ef | grep virtuoso" to verify. Killing
its process is not the correct way to stop virtuoso. If you did not
install "/etc/init.d/virtuoso stop" into your inittab, using "isql
[port] [user] [password] -K" may be the safest way to shut down

Sometimes there is a .lck file in the same directory with virtuoso.ini
(or any ini file you use). Deleting that file and try starting again?

Installing other triple stores

We know how to install: