How To Install Gradle on CentOS 8 / 7 & RHEL 8 / 7 Apr 7, 2020 Raj 2 min read CONTENTS Install JDK / JRE Install Gradle Setup environment variables Verify Gradle installation Conclusion SHARE THIS DOCUMENT IS ALSO AVAILABLE FOR CentOS 7 Ubuntu 18.04 Ubuntu 16.04 Debian 10 Debian 9 Gradle is an open-source build automation system. It supports multiple programming languages such as Java, C++, and Python development. It is based on the concepts of Apache Ant and Apache Maven. Gradle uses Groovy to define project configurations. In this post, we will install Gradle on CentOS 8 / 7 & RHEL 8 / 7. Install JDK / JRE Gradle’s only requirement is to have Java JDK or JRE version 8 or above to be installed on the system. If you prefer Oracle Java JDK over OpenJDK, then: READ: How To Install Oracle Java on CentOS 8 / RHEL 8 READ: How To Install Oracle Java on CentOS 7 / RHEL 7 Here, I will go with OpenJDK 8. Install the OpenJDK package by using the yum command. yum install -y java Verify the Java installation by running the following command. java -version Output: openjdk version "1.8.0_242" OpenJDK Runtime Environment (build 1.8.0_242-b08) OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode) Install other required packages. yum install -y wget unzip Install Gradle Download the latest version of the Gradle (v6.3) from its official site. We will use the Gradle Binary-only zip file for the installation. OR Use the below command to download Gradle (v6.3) in the terminal. cd /tmp wget https://services.gradle.org/distributions/gradle-6.3-bin.zip Extract the downloaded zip file and copy it to /opt/gradle directory. unzip gradle-*.zip mkdir /opt/gradle cp -pr gradle-*/* /opt/gradle Verify the extracted files by listing the contents of /opt/gradle/ directory. ls /opt/gradle/ Output: LICENSE NOTICE bin getting-started.html init.d lib media Setup environment variables We will now configure the profile for the PATH environment variable to include the Gradle’s bin directory. Run the following command to add the environment. echo "export PATH=/opt/gradle/bin:${PATH}" | tee /etc/profile.d/gradle.sh Make the profile file executable by using the chmod command. sudo chmod +x /etc/profile.d/gradle.sh Load the environment variables to the current session by using the following command. source /etc/profile.d/gradle.sh Verify Gradle installation Validate the Gradle installation using the below command. gradle -v Output: Welcome to Gradle 6.3! Here are the highlights of this release: - Java 14 support - Improved error messages for unexpected failures For more details see https://docs.gradle.org/6.3/release-notes.html ------------------------------------------------------------ Gradle 6.3 ------------------------------------------------------------ Build time: 2020-03-24 19:52:07 UTC Revision: bacd40b727b0130eeac8855ae3f9fd9a0b207c60 Kotlin: 1.3.70 Groovy: 2.5.10 Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019 JVM: 1.8.0_242 (Oracle Corporation 25.242-b08) OS: Linux 4.18.0-80.7.1.el8_0.x86_64 amd64 Conclusion That’s All. You have successfully installed Gradle on CentOS 8 / 7 & RHEL 8 / 7. Visit the official Gradle’s Documentation page to learn how to get started with Gradle. centos-8 rhel-8 centos-7 rhel-7 java gradle Prev Post How To Setup High Availability Cluster on CentOS 8 / RHEL 8 Next Post How To Install Apache Tomcat on Debian 10 / Debian 9 RELATED POSTS How To Setup High Availability Cluster on CentOS 8 / RHEL 8 How To Setup Icinga Web 2 on CentOS 8 / RHEL 8 How To Install KVM on CentOS 8 / RHEL 8 How To Install Cockpit on CentOS 8 / RHEL 8 How To Install Icinga 2 on CentOS 8 / RHEL 8 How To Install ImageMagick and PHP Imagick on CentOS 8 / RHEL 8 Please enable JavaScript to view the comments powered by Disqus. comments powered by Disqus RECENT POSTS How To Install VirtualBox On Linux Mint 20 How To Backup and Restore Ubuntu & Linux Mint With Timeshift How To Upgrade To Linux Mint 20 From Linux Mint 19 [Detailed Guide] How To Install KVM On Ubuntu 20.04 / Linux Mint 20 How To Install Plex Media Server On Ubuntu 20.04 / Linux Mint 20 How To Install Android Studio on Ubuntu 20.04 TOP POSTS Install xrdp on CentOS 7 / RHEL 7 Install Gnome GUI on CentOS 7 / RHEL 7 Change default network name (ens33) to old “eth0” on Ubuntu… Install μTorrent (uTorrent) on Ubuntu 14.04 How To Configure High-Availability Cluster on CentOS 7 /… How To Install and Configure VNC Server in CentOS 7 / RHEL 7