step1: download
step2: decompress
After downloading, unzip it to any directory, and I unzip it under /usr/local/.
step3: Configure environment variables
Run the following command at the command line
sudo vim /etc/bashrc
Add the following
GRADLE_HOME=/usr/local/gradle-2.14; export GRADLE_HOME export PATH=$PATH:$GRADLE_HOME/bin
Then make the configuration file take effect
source /etc/bashrc
then use
gradle -version
Test the command.