Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sdkman available to root user but not to other users

Tags:

grails

sdkman

I installed sdkman as a root user using curl in CentOS 6.8 I installed Grails using sdkman and it is only available to the root user.

Do I need to install sdkman as other regular user in order for Grails to work or is there a way to use Grails I installed as a root user?

Thank you.

like image 235
monty_bean Avatar asked Aug 18 '16 15:08

monty_bean


1 Answers

I'd encourage you to make sdkman available to other users (look at its Docs, paragraph Custom Installation, add init script that sources init file from $SDKMAN_DIR/bin directory).

Then have users who want Grails install it.

Or install Grails via its repository (accepting, that this will be an older version than one from SDKMAN).

In my case I used:

  1. export SDKMAN_DIR="/usr/local/sdkman" && curl -s "https://get.sdkman.io" | bash - make sure $SDKMAN_DIR doesn't exist before you install sdkman as it will be overwritten otherwise
  2. In .bashrc files for users I wanted to be able to use sdkman. AT THE VERY END of these otherwise, it may not work

    export SDKMAN_DIR="/usr/local/sdkman" [[ -s "/usr/local/sdkman/bin/sdkman-init.sh" ]] && source "/usr/local/sdkman/bin/sdkman-init.sh"

Docs: http://sdkman.io/install.html

like image 66
LAFK says Reinstate Monica Avatar answered Sep 21 '22 05:09

LAFK says Reinstate Monica