26.8 C

How To Install Gradle on CentOS 8

Today we are going to learn that how we can Install Gradle on CentOS 8. Gradle is free & Open Source tool that is widely used for the Java projects. The programming language used by the Gradle is Groovy that is dynamic and well defined OOP (Object oriented programming) language. It is also used for the development of scripts for Java language. You can also see the variety of Gradle projects in Android alos. So, without wasting time let’s move towards the insallation of Gradle on CentOS 8. Just follow the below steps for easy installation.


Here’s the list of requirements you need to install Gradle on CentOS 8.

  • OpenJDK
  • Gradle Package
  • Environment Variables

Make sure you’ve sudo privileges.

Step 1: Install OpenJDK

First of all install the Java on your CentOS system. Fire the below command to install OpenJDK 8 on CentOS 8.

- Advertisement -
sudo yum install java-1.8.0-openjdk-devel

Verify the installation of Java by running the below command.

java -version
how to install gradle on centos 8

Step 2: Downloading Gradle

To download Gradle, go to their official release page. The latest available version at the time of this writing is 6.2.2 released on March 04, 2020. You can visit the official site if there’s new version available.

So, download it from the website or run the following command in your terminal

wget https://services.gradle.org/distributions/gradle-6.2.2-bin.zip -P /tmp

Then unzip the package downloaded by

sudo unzip -d /opt/gradle /tmp/gradle-6.2.2-bin.zip

Step 3: Setting Up Environment Variables

PATH Environment variable must include the Gradle directory. So, make a new file with the name gradle.sh under the /etc/profile.d/ directory.

sudo nano /etc/profile.d/gradle.sh

After it paste the below data into the file.

export GRADLE_HOME=/opt/gradle/gradle-6.2.2
export PATH=${GRADLE_HOME}/bin:${PATH}

Then Save and close the file.

Run the given command to make your script executable

sudo chmod +x /etc/profile.d/gradle.sh

After it load the Environment variables by typing

source /etc/profile.d/gradle.sh

As we’ve all done, so check the version of Installed Gradle to verify our Installation.

gradle -v


gradle version how to install gradle 6.2.2

So, this is how you can Install Gradle on your CentOS 8.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
"The best Linux newsletter on the web"


Please enter your comment!
Please enter your name here

Latest article