Now that there are more and more projects replacing MAVEN with Gradle, here's a description of how to install the configuration Gradle environment in a CentOS server environment.
1. On the http://www.gradle.org/downloads page, download the latest version of the Gradle software package, which is the 2.2.1 version when writing this document.
2. After downloading the gradle-2.2.1-all.zip or gradle-2.2.1-bin.zip file, unzip it in the/usr/local directory
$CD/usr/local$sudo unzip ~/gradle-2.2.1-all.zip.
3. Then set the operating environment
$sudo Vi/etc/profile
Add the Gradle_home output path to the file, and the revision path is set as follows
Export Gradle_home=/usr/local/gradle-2.2.1export Path=${java_home}/bin:${jre_home}/bin:${gradle_home}/bin:${java _home}:${path}
Append ${gradle_home}/bin to the path statement, allowing the system to find the paths to the executable file.
If you don't want all users to use this configuration, you can configure the Gradle environment separately for your account,
In the home directory of your account
$ VI. bash_profile
Make a similar edit.
4. After the exit is saved, in order for the changes to take effect immediately, execute
$source/etc/profile
5. View version information for Gradle
$ gradle-version------------------------------------------------------------gradle 2.2.1------------------------ ------------------------------------Build Time: 2014-11-24 09:45:35 utcbuild number:nonerevision: 6fcb59c06f43a4e6b1bcb401f7686a8601a1fb4agroovy: 2.3.6Ant: Apache Ant (TM) version 1.9.3 compiled on December 2013JVM: 1.8.0_25 (Oracle Corporation 25.25-b02) OS: Linux 2.6.32-431.11.2.el6.i686 i386
6.gradle successfully installed, then you can use commands such as Gradle build
Installing the Gradle compilation environment under centos6.5