Link Search Menu Expand Document
Start for Free

MacOS Installation

This page describes how to install Stardog on MacOS.

Page Contents
  1. Overview
  2. Homebrew
  3. Manual Installation
  4. What’s Next?

Overview

Mac users can choose to install Stardog manually or use Homebrew to aid the installation and setup.

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

Homebrew

  1. To install Stardog via Homebrew, use the following command:

     ​​$ brew install stardog-union/tap/stardog
    

    Homebrew will take care of the installation for you including adding Stardog’s /bin folder to your PATH so stardog and stardog-admin commands can be used regardless of current working directory.

  2. Setup STARDOG_HOME

    The most important piece of configuration to do before you start Stardog is setting the STARDOG_HOME environment variable. This is the directory where all the Stardog databases and other files will be stored. If STARDOG_HOME is not defined, Stardog will use the Java user.dir property value.

    Our convention is to set STARDOG_HOME to /var/stardog but this can be any directory. We highly reccomend not setting this to the directory where Homebrew installed Stardog to (likely /usr/local/Caskroom/stardog ).

    Place the following in your .bash_profile or whatever file you use to configure your shell.

     export STARDOG_HOME = /var/stardog
    
  3. License key

    If you do not have a license key

    You can obtain a license key on the Getting Started Page.

    If you have a license key

    Add it to your STARDOG_HOME. Ensure that the stardog-license-key.bin file is readable by the Stardog process.

     $ cp stardog-license-key.bin $STARDOG_HOME
    

    You can specify a different location for the license file by setting the environment variable STARDOG_LICENSE_PATH.

  4. Start up the Stardog server

     $ stardog-admin server start
    

    If the server starts up successfully, you should see an output like this in your terminal:

     ************************************************************
     This copy of Stardog is licensed to Somebody Awesome (somebody.awesome@stardog.com), Stardog
     This is a Enterprise license
     This license does not expire.
     ************************************************************
    
                                                                 :;
                                         ;;                   `;`:
     `'+',    ::                        `++                    `;:`
     +###++,  ,#+                        `++                    .
     ##+.,',  '#+                         ++                     +
     ,##      ####++  ####+:   ##,++` .###+++   .####+    ####++++#
     `##+     ####+'  ##+#++   ###++``###'+++  `###'+++  ###`,++,:
     ####+    ##+        ++.  ##:   ###  `++  ###  `++` ##`  ++:
     ###++,  ##+        ++,  ##`   ##;  `++  ##:   ++; ##,  ++:
         ;+++  ##+    ####++,  ##`   ##:  `++  ##:   ++' ;##'#++
         ;++  ##+   ###  ++,  ##`   ##'  `++  ##;   ++:  ####+
     ,.   +++  ##+   ##:  ++,  ##`   ###  `++  ###  .++  '#;
     ,####++'  +##++ ###+#+++` ##`   :####+++  `####++'  ;####++`
     `####+;    ##++  ###+,++` ##`    ;###:++   `###+;   `###++++
                                                         ##   `++
                                                     .##   ;++
                                                         #####++`
                                                         `;;;.
     ************************************************************
    
    
     Stardog server 7.4.0 started on Thu Oct 01 21:12:22 EDT 2020.
    
     Stardog server is listening on all network interfaces.
     HTTP server available at http://localhost:5820.
    
     STARDOG_HOME=/var/stardog/
    

    By default, the Stardog server will become available at http://localhost:5820

    What’s Next?

Manual Installation

  1. Execute the following command from your terminal to download the latest distribution of Stardog into your current working directory.

     $ curl https://downloads.stardog.com/stardog/stardog-latest.zip --output stardog-latest.zip
    
  2. Unzip stardog-latest.zip

     $ unzip stardog-latest.zip
    

    Stardog binaries are located at ./stardog-<version>/bin

  3. Setup STARDOG_HOME

    The most important piece of configuration to do before you start Stardog is setting the STARDOG_HOME environment variable. This is the directory where all the Stardog databases and other files will be stored. If STARDOG_HOME is not defined, Stardog will use the Java user.dir property value.

    You should not set STARDOG_HOME to be the same as the directory where you put the Stardog binary. Our convention is to put Stardog(s) (previously downloaded in Step 1) in /opt/stardog/{$version} and set STARDOG_HOME to /var/stardog.

    Stardog Convention

     /
     │   
     └─── opt/
     │   │  
     │   └─── stardog/ <--- stardog installations here
     │       │  stardog-7.4.0/
     │       │  stardog-7.4.1/ 
     │       │  ...
     │   
     └─── var/
         │   
         └───stardog/ <--- $STARDOG_HOME
    

    Place the following in your .bash_profile or whatever file you use to configure your shell.

     export STARDOG_HOME = /var/stardog
    
  4. License key

    If you do not have a license key

    You can obtain a license key on the Getting Started Page

    If you have a license key

    Add it to your STARDOG_HOME. Ensure that the stardog-license-key.bin file is readable by the Stardog process.

     $ cp stardog-license-key.bin $STARDOG_HOME
    

    You can specify a different location for the license file by setting the environment variable STARDOG_LICENSE_PATH.

  5. Setting Your Path

    Place the bin/ folder of the Stardog installation on your PATH so stardog and stardog-admin commands can be used regardless of current working directory.

    We recommend adding to your ~/.bash_profile or whatever file you use to configure your shell, though you can also set it temporarily.

     # This assumes you've followed our convention above. If you put stardog somewhere else, update accordingly.
     export PATH="$PATH:/opt/stardog/stardog-<version>/bin"
    
  6. Start up the Stardog server

    We can start up the server using the stardog-admin CLI. We use the server start command.

     $ stardog-admin server start
    

    If the server starts up successfully, you should see an output like this in your terminal:

     ************************************************************
     This copy of Stardog is licensed to Somebody Awesome (somebody.awesome@stardog.com), Stardog
     This is a Enterprise license
     This license does not expire.
     ************************************************************
    
                                                                 :;
                                         ;;                   `;`:
     `'+',    ::                        `++                    `;:`
     +###++,  ,#+                        `++                    .
     ##+.,',  '#+                         ++                     +
     ,##      ####++  ####+:   ##,++` .###+++   .####+    ####++++#
     `##+     ####+'  ##+#++   ###++``###'+++  `###'+++  ###`,++,:
     ####+    ##+        ++.  ##:   ###  `++  ###  `++` ##`  ++:
     ###++,  ##+        ++,  ##`   ##;  `++  ##:   ++; ##,  ++:
         ;+++  ##+    ####++,  ##`   ##:  `++  ##:   ++' ;##'#++
         ;++  ##+   ###  ++,  ##`   ##'  `++  ##;   ++:  ####+
     ,.   +++  ##+   ##:  ++,  ##`   ###  `++  ###  .++  '#;
     ,####++'  +##++ ###+#+++` ##`   :####+++  `####++'  ;####++`
     `####+;    ##++  ###+,++` ##`    ;###:++   `###+;   `###++++
                                                         ##   `++
                                                     .##   ;++
                                                         #####++`
                                                         `;;;.
     ************************************************************
    
    
     Stardog server 7.4.0 started on Thu Oct 01 21:12:22 EDT 2020.
    
     Stardog server is listening on all network interfaces.
     HTTP server available at http://localhost:5820.
    
     STARDOG_HOME=/var/stardog/
    

    By default, the Stardog server will become available at http://localhost:5820

What’s Next?

Access Stardog Studio, our IDE for interacting with Stardog, and connect to your running Stardog server.

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