Linux Installation
This page describes how to install Stardog CLI tools on different flavors of Linux.
Page Contents
Linux packages install Stardog CLI tools only. To run a Stardog server, use Docker. The CLI tools can be used to connect to and manage remote Stardog servers.
Debian Based Systems
To install Stardog CLI 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-cli=<version>
This will first add the Stardog gpg key to the system and then fetch and install the Stardog CLI package.
Stardog CLI binaries should now be in the /opt/stardog/bin directory.
RPM Based systems
To install Stardog CLI 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-cli-<version>
Stardog CLI binaries should now be in the /opt/stardog/bin directory.
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 CLI like so:
$ sudo yum-config-manager --add-repo http://packages.stardog.com/rpms/stardog.repo
$ sudo yum-config-manager --enable stardog
$ sudo yum install -y stardog-cli-<version>
Stardog CLI binaries should now be in the /opt/stardog/bin directory.
Using the CLI
After installation, add the Stardog bin directory to your PATH:
$ export PATH=$PATH:/opt/stardog/bin
You can now use the stardog and stardog-admin commands to connect to remote Stardog servers:
# Query a remote server
$ stardog query -s http://my-stardog-server:5820 mydb "SELECT * WHERE { ?s ?p ?o } LIMIT 10"
# Check server status
$ stardog-admin --server http://my-stardog-server:5820 server status
What’s Next?
Get Started with Stardog Cloud, our complete Enterprise Knowledge Graph Platform.
Check out our additional Getting Started Resources for some introductory blog posts, tutorials, video trainings and more.