Skip to content

Virtuoso Installation & Configuration

How do I get Virtuoso?

Pre-built binaries

These periodically produced pre-built binaries, typically from stable milestones, will let you get up-and-running quickly with VOS, without building from code yourself.

Download steps:

  1. Click here to access the download page.
  2. Locate the “Pre-built binaries” section. These binaries are periodically produced from stable milestones and let you get up and running quickly without building from code yourself.
  3. Browse to locate pre-built binaries for your operating system, or download via the provided links.

Docker

Virtuoso also has an image and documentation on Docker Hub. Please check for the newest version on the official OpenLink website. Below are the steps for getting Virtuoso Open-Source 7, although the steps are similar for other versions.

Click to see Docker installation steps

QuickStart Guide

Downloading the image:

Terminal window
$ docker pull openlink/virtuoso-opensource-7

To check the version of the Virtuoso⁠ binary, you can use the following command:

Terminal window
$ docker run openlink/virtuoso-opensource-7 version
[openlink/virtuoso-opensource-7:7.2.13-r19-g8273aad-ubuntu]
This Docker image is using the following version of Virtuoso:
Virtuoso Open Source Edition (Column Store) (multi threaded)
Version 7.2.13.3240-pthreads as of Jun 10 2024 (a1fd8195b)
Compiled for Linux (x86_64-ubuntu_focal-linux-gnu)
Copyright (C) 1998-2024 OpenLink Software

Creating a sample Virtuoso instance:

Here is a quick example of how to create a new virtuoso instance on your system:

Terminal window
$ mkdir my_virtdb
$ cd my_virtdb
$ docker run \
--name my_virtdb \
--interactive \
--tty \
--env DBA_PASSWORD=mysecret \
--publish 1111:1111 \
--publish 8890:8890 \
--volume `pwd`:/database \
openlink/virtuoso-opensource-7:latest

This will create a new Virtuoso⁠ database in the my_virtdb subdirectory and starts a Virtuoso instance with the HTTP server listening on port 8890 and the ODBC⁠ / JDBC⁠ / ADO.Net⁠ / OLE-DB⁠ / ISQL data server listening on port 1111.

The docker⁠ image in running in foreground (with -i or —interactive) mode, so you can see what it is doing.

You should now be able to contact the Virtuoso⁠ HTTP server using the following URL:

Terminal window
http://localhost:8890/

Passwords

DBA Password: Set via DBA_PASSWORD environment variable. If not set, a random password is generated and stored at /settings/dba_password. DAV Password: Set via DAV_PASSWORD environment variable. Defaults to DBA_PASSWORD if not set and stored at /settings/dav_password. To reveal the randomized passwords:

Terminal window
$ docker exec -i -t my_virtdb cat /settings/dba_password

Without this password, you will not be able to log in to the dba account using either the isql tool or the Virtuoso Conductor.

⚠️ NOTE: Users are advised to immediately change the password and then remove this file from the filesystem.

Persistent storage

In order to retain changes to the Virtuoso database, the database documents should be stored on the host file system.

The docker⁠ image exposes a /database volume that can be easily mapped to a local directory on the filesystem. If this directory is empty, the docker image will put an initial virtuoso.ini into the mapped directory and then proceeds to create a new database.

Stopping the Image

Terminal window
$ docker stop my_virtdb

Restarting the Image

Terminal window
$ docker start my_virtdb

Using isql to Connect

To connect to your running Virtuoso⁠ instance, you can use the following command:

Terminal window
$ docker exec -i my_virtdb isql 1111

Enter the dba account password when prompted.

Using an Existing Database

If the mapped directory contains a virtuoso.ini and accompanying database documents, the new docker⁠ image will attempt to use these.

NOTE: Directory paths referenced in the virtuoso.ini should be relative to the internal directory structure of the docker⁠ image in order to work.

For more details, refer to the official Virtuoso documentation.

Virtuoso Source Code

We recommend these Build Instructions for compiling from source. The latest source code for Virtuoso may be checked-out from Virtuoso on Github using

Terminal window
$ git clone git://github.com/openlink/virtuoso-opensource.git

Virtuoso’s branches are called:

stable/7

stable/6

develop/7

develop/6

Please refer to the documentation on Virtuoso Git usage for more details.

Building Virtuoso Open-Source Edition

Openlink provides an alternative method for installing Virtuoso by building it from source. This method involves several steps, including downloading the source code, installing dependencies, and compiling the software. This part explains steps to take after obtaining a Virtuoso source snapshot or cvs checkout.

Click to the steps of Building Virtuoso Open-Source Edition

Requirements

  1. Disk Space:
    Ensure at least 800 MB of free space for the build process and about 460 MB for installation.

  2. Package Dependencies:
    Ensure you have the following packages installed on your system:

PackageVersionFrom
autoconf2.57http://www.gnu.org/software/autoconf/
automake1.9http://www.gnu.org/software/automake/
libtool1.5http://www.gnu.org/software/libtool/
flex2.5.33http://flex.sourceforge.net/
bison2.3http://www.gnu.org/software/bison/
gperf2.7.2http://www.gnu.org/software/gperf/
gawk3.1.1http://www.gnu.org/software/gawk/
m41.4.1http://www.gnu.org/software/m4/
make3.79.1http://www.gnu.org/software/make/
OpenSSL0.9.7ihttp://www.openssl.org/

The above versions are the minimum recommended versions of these packages. Older versions of these packages may sometimes be used, but could cause build problems. To check the version number of the tools installed on your system, use one of the following commands:

<package name> --version

Steps to Build and Install

If working from CVS/GIT, run ./autogen.sh to generate the necessary files. Use ./configure to set the build parameters. Compile with make to produce the binaries and VAD packages. Optionally, run make check to verify the build using the test suite.

Installation

After building, install with:

Terminal window
make install

This will copy files to the specified directories (default is /usr/local/).

Post-Installation Ensure the $PREFIX/bin directory is in your shell’s PATH. Start the server by navigating to the database directory:

Terminal window
cd var/lib/virtuoso/db
virtuoso-t -f &

Access the Virtuoso server via http://localhost:8890/.

Using VAD Packages Install VAD packages via the command line or web interface. Ensure the DirsAllowed parameter in the ini file allows access to the package directory.

This guide helps set up a working Virtuoso instance, providing the basics for building and managing the server and its components. For more detail please check this link.

How do I upgrade Virtuoso?

Upgrading Virtuoso involves several steps to ensure data integrity and compatibility. Below is a comprehensive guide.

Click to see Virtuoso upgrade steps

General Preparation Steps

Backup Your Database

Before starting any upgrade, ensure you have a complete backup of your database. This precaution protects against data loss in case of issues during the upgrade process.

Shut Down the Database and Clear Logs
  1. Properly shut down your Virtuoso instance.

  2. Clear the transaction log (virtuoso.trx) by launching Virtuoso with the +checkpoint-only argument. This command replays the transaction log, runs a checkpoint to zero the log, and then exits cleanly:

    Terminal window
    virtuoso-t +checkpoint-only

Specific Upgrade Paths

Upgrading from Release 4.x or Earlier to Release 6.x or Later
  1. Upgrade from Release 4.x to Release 5.x.

  2. Upgrade from Release 5.x to Release 6.x or later.

    Note: This incremental upgrade is necessary due to significant changes in database formats and features.

Upgrading from Release 5.x to 6.x or Later
  • Dump Data: Use the dbdump tool to export data from the Release 5.x database, as direct upgrade paths are not supported.
  • Reload Data: Import the dumped data into the new Virtuoso 6.x or later instance using the isql tool.
  • Special Considerations for RDF Data: Use stored procedures to dump RDF graphs if needed. Contact OpenLink Support for assistance.
Upgrading from Release 6.x to 7.x or 8.x
  1. Clear Transaction Log: Ensure the .trx file size is zero by running the instance with +checkpoint-only.
  2. Install New Version: Replace the old binaries with the newer 7.x or 8.x binaries.
  3. VAD Archives: Download and install the latest Virtuoso Application Data (VAD) packages compatible with the new version.
Upgrading from Release 6.1.x to a Newer 6.1.x
  • Check Transaction Log: Ensure the transaction log is empty before upgrading to avoid version conflicts.
  • Direct Upgrade: The database format has not changed, so you can directly install the new binaries.
Upgrading from Release 6.1.3 or Earlier to 6.1.4 or Later
  • RDF Data Check: Versions before 6.1.4 may have indexing issues with RDF data. Upon first startup with 6.1.4, the system will check and potentially fix these issues.
  • Manual Update: If issues are detected, you must set AnalyzeFixQuadStore = 1 in the virtuoso.ini file and restart the server to apply fixes.

Running the Demo Database

  1. Set Up Directory: Create a directory for the demo database (e.g., C:\dbs\virtuoso).

  2. Copy Files: Copy the demo database and configuration files to the directory.

  3. Start Service: Register and start the Virtuoso service:

    Terminal window
    virtuoso-t -c demo -I Demo -S create
    virtuoso-t -c demo -I Demo -S start
  4. Access Admin Interface: Use http://localhost:8890/conductor to access the admin interface.

Additional Considerations

  • Checking Disk Space: Ensure you have adequate disk space for the upgrade, especially if converting tables or reindexing data.
  • Support Contact: For complex upgrades or if issues arise, contact OpenLink Support at support@openlinksw.com.

For a more detailed explanation, please refer to the Virtuoso documentation at this link.