Search code examples
macosbashpathenvironment-variablesstardog

Stardog server start with license key : wrong STARDOG_HOME


I'm on MAC OSX. I added these lines in my ~/.bash_profile :

PATH="/usr/local/stardog/bin:${PATH}"
export STARDOG_HOME=/data/stardog
export PATH

Then, in command line, I execute

cp stardog-licence-key.bin $STARDOG_HOME as the quick-start documentation states.

But, this seems useless, because when I execute sudo stardog-admin server start, it says :

A Stardog license was not found.
The license file 'stardog-license-key.bin' 
should be in your Stardog Home directory 'xx/xx'.

xx/xx is the current directory when I launch this command ... but stardog home directory is supposed to be /data/stardog, not my working directory !

How to tell stardog his actual home directory ?


Solution

  • Fine (and sorry), I did not mention some elements : I executed the command stardog-admin server start with sudo (as seen in the last edit of my question).

    Reasons : I launched this command with sudo because I needed some permissions to start stardog properly.

    Problem : With sudo, stardog home is not the one defined in my previous .bash_profile anymore.

    Solution : I give (owner) permissions to myself on the directory $STARDOG_HOME with the command sudo chown -R myUsername /data/stardog

    Open a new bash, type stardog-admin server start without sudo, it works.