1

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 ?

Spadon_
  • 495
  • 2
  • 5
  • 11
  • 1
    I did exactly what you described and it worked fine. After you edited your `.bash_profile` did you try in a new terminal window or an existing one? If the latter, that might be the problem, changes to your profile won't take affect in existing windows. – Michael Jul 17 '14 at 11:56
  • Yeap, sorry I didn't clarify that but I opened a new terminal window. Actually, the command "stardog-admin server start" only works if I got the license key in my working directory. – Spadon_ Jul 17 '14 at 12:22
  • Following your exact steps works for me, it reads the license from the exported `STARDOG_HOME` in my bash profile. I'm on 10.9.4 using the Apple Java 6 JDK. – Michael Jul 17 '14 at 14:57
  • 1
    Maybe unrelated, but you should append to the system's `PATH`, not replace it. What you have will make e.g. `ls` and `cp` unavailable unless you specify their full paths. – tripleee Jul 17 '14 at 15:24
  • Yeap that's true. I edited my post consequently ;-) – Spadon_ Jul 18 '14 at 12:15

1 Answers1

0

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.

Spadon_
  • 495
  • 2
  • 5
  • 11