Linux Installation
This page describes how to install Stardog on different flavors of Linux.
Page Contents
Before continuing with the installation guide, please review the System Requirements for running Stardog, specifically the Open Files Setting.
Debian Based Systems
To install Stardog using apt-get
run the following commands:
$ sudo apt update
$ sudo apt install gnupg
$ curl http://packages.stardog.com/stardog.gpg.pub | sudo apt-key add
$ echo "deb http://packages.stardog.com/deb/ stable main" | sudo tee -a /etc/apt/sources.list
$ sudo apt-get update
$ sudo 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 License key instructions below to set up your Stardog license.
RPM Based systems
To install Stardog using yum
run the following commands:
$ curl http://packages.stardog.com/stardog.gpg.pub -o stardog.gpg.pub
$ sudo rpm --import stardog.gpg.pub
$ curl http://packages.stardog.com/rpms/stardog.repo | sudo tee /etc/yum.repos.d/stardog.repo
$ sudo yum install -y stardog-<version>
Stardog binaries should now be in the /opt/stardog
directory.
Continue to the License key instructions below to set up your Stardog license.
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
$ sudo amazon-linux-extras install java-openjdk11
$ sudo yum install -y stardog-<version>
Stardog binaries should now be in the /opt/stardog
directory.
Continue to the License key instructions below to set up your Stardog license.
License key
If you do not have a license key
You can obtain a license key by speaking with a Stardog sales representative. If you do not want to manage your own Stardog license, you can simply sign up for a free account with Stardog Cloud.
If you have a license key
Add it to /var/opt/stardog
. Ensure that the stardog-license-key.bin
file is readable by the Stardog process.
$ sudo cp stardog-license-key.bin /var/opt/stardog
By default, Stardog will recognize your license key if its name follows the pattern stardog*.bin
(i.e., stardog
, followed by anything, and ending with .bin
) and it resides in your home directory. You can specify a different location for the license file or a name that uses a different pattern by setting the environment variable STARDOG_LICENSE_PATH
.
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:
$ sudo systemctl start stardog
$ sudo systemctl restart stardog
$ sudo systemctl stop stardog
If, upon trying to start the Stardog service, you get the error message Failed to start stardog.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
, try installing polkit
and restarting the systemd
daemon:
$ sudo yum install polkit
$ sudo systemctl daemon-reload
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.