第一步:

去官网下载最新安装包https://gradle.org/install/

第二步:

上传到linux并解压

在centos7安装gradle_安装包

解压:

unzip gradle-5.6.2-bin.zip

 如果没有unzip,安装unzip:

yum install unzip

第三步:将如下文件追加到/etc/profile文件末尾

export GRADLE_HOME=/home/tool/gradle/gradle-5.6.2
export PATH=${GRADLE_HOME}/bin:${PATH}

第四步:重载profile 文件

source /etc/profile

第五步:体验是否安装成功

gradle -version