gradle是目前很火的打包工具
============= 完美的分割线 ==============
1.准备工作
1)本教程适用于以下系统环境
CentOS6.9_x64
CentOS7.5_x64
2)gradle的运行依赖Java环境,需要预先安装,具体Java安装方法可以参考我的另一篇博文:
linux下yum安装jdk1.8(rpm包)和tomcat-8.5
https://www.cnblogs.com/tssc/p/9691329.html
2.安装gradle
1)下载软件包
# 20180922最新安装包版本4.10.2
mkdir -p /server/tools cd /server/tools/ wget https://downloads.gradle.org/distributions/gradle-4.10.2-all.zip
2)解压安装gradle软件包
unzip -D gradle-4.10.2-all.zip mv gradle-4.10.2 /usr/local/gradle ll /usr/local/gradle ln -s /usr/local/gradle/bin/gradle /usr/bin/gradle ll /usr/bin/gradle
3)配置环境变量
echo " ">>/etc/profile echo "# Made for gradle env by zhaoshuai on $(date +%F)">>/etc/profile echo 'export GRADLE_HOME=/usr/local/gradle'>>/etc/profile echo 'export PATH=$GRADLE_HOME/bin:$PATH'>>/etc/profile
# 使环境变量生效
tail -4 /etc/profile
source /etc/profile
4)检查变量配置
echo $PATH
5)查看安装的mvn版本号
which gradle
gradle -version
# 看到以下返回表示安装成功
[root@PubCenter tools]# gradle -v ------------------------- Gradle 4.1 ------------------------- Build time: 2017-08-07 14:38:48 UTC Revision: 941559e020f6c357ebb08d5c67acdb858a3defc2 Groovy: 2.4.11 Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015 JVM: 1.8.0_65 (Oracle Corporation 25.65-b01) OS: Linux 2.6.32-431.el6.x86_64 amd64
======= 完毕,呵呵呵呵 =======