Install
yum install -y java-1.7.0-openjdk-devel
curl -s get.gvmtool.net|bash
source "/root/.gvm/bin/gvm-init.sh"
gvm i groovy 2.2.1
Usage
groovysh
groovy hw.groovy
All files and installed components are in folder ~/.gvm. So simply remove this folder for uninstallation of gvm.
gvm is portable, so if you install gvm as root, just copy .gvm folder to $HOME, chown, then gvm c
to show the current groovy version. If it's not what you want, gvm use groovy 2.2.1
to update it.
Install gvm to another host, first copy .gvm folder, then add "source ~/.gvm/bin/gvm-init.sh" into .bashrc(or .zshrc), then check and setup in new host as above.