Link Search Menu Expand Document
Start for Free

Linux Installation

This page describes how to install Stardog on different flavors of Linux.

Page Contents
  1. Debian Based Systems
  2. RPM Based systems
    1. Amazon EC2
  3. Package Layout
    1. Customize Stardog’s Environment
  4. What’s Next?

Before continuing with the installation guide, please review the System Requirements for running Stardog.

Debian Based Systems

To install Stardog using apt-get run the following commands:

$ curl http://packages.stardog.com/stardog.gpg.pub | apt-key add
$ echo "deb http://packages.stardog.com/deb/ stable main" >> /etc/apt/sources.list
$ apt-get update
$ apt-get install -y stardog=<version>

This will first add the Stardog gpg key to the systems and then fetch and install the latest Stardog deb package.

Stardog binaries should now be in the /opt/stardog directory.

Continue to the Package Layout layout instructions below to manage Stardog.


RPM Based systems

To install Stardog using yum run the following commands:

$ curl http://packages.stardog.com/rpms/stardog.repo > /etc/yum.repos.d/stardog.repo
$ yum install -y stardog-<version>

Stardog binaries should now be in the /opt/stardog directory.

Continue to the Package Layout layout instructions below to manage Stardog.

Amazon EC2

Certain Amazon EC2 instances do not let you redirect output into /etc/yum.repos.d as specified above. On such instances you can install Stardog like so:

$ sudo yum-config-manager --add-repo http://packages.stardog.com/rpms/stardog.repo
$ sudo yum-config-manager --enable stardog
$ yum install -y stardog-<version>

Stardog binaries should now be in the /opt/stardog directory.

Continue to the Package Layout layout instructions below to manage Stardog.


Package Layout

The packages require that OpenJDK 11 and all of its dependencies are installed on the system. The package managers will install them if they are not already there. Stardog is then configured to start on boot via systemd and thus it can be controlled by the systemctl tool as shown below:

$ systemctl start stardog
$ systemctl restart stardog
$ systemctl stop stardog

Customize Stardog’s Environment

To customize the environment in which stardog is run the file /etc/stardog.env.sh can be altered with key value pairs, for example:

export STARDOG_HOME=/var/opt/stardog
export STARDOG_SERVER_JAVA_ARGS="-Xmx4g -Xms4g -XX:MaxDirectMemorySize=6g"

By default, the STARDOG_HOME environment variable will be set to /var/opt/stardog as seen above. This is the directory where all the Stardog databases and other files will be stored. You may change this environment variable.

We also show the environment variable STARDOG_SERVER_JAVA_ARGS being set to allocate memory to Stardog. This is discussed in detail in the Capacity Planning section in the Server Administration chapter.

If your system does not control services with systemd you can still install Stardog with these packages, however you must configure and run it in some other way. Altering the file /etc/stardog.env.sh will have no effect.


What’s Next?

Get Started with Stardog Cloud, our complete Enterprise Knowledge Graph Platform, and connect to your running Stardog server. If you want to encrypt network traffic when using Stardog, see this guide for setting up SSL.

Check out our additional Getting Started Resources for some introductory blog posts, tutorials, video trainings and more.