How To Install Gradle on AlmaLinux 9

In this tutorial, we want to teach you How To Install Gradle on AlmaLinux 9.

Gradle is a build automation tool known for its flexibility in building software. A build automation tool is used to automate the creation of applications. The building process includes compiling, linking, and packaging the code. The process becomes more consistent with the help of building automation tools.

It is popular for its ability to build automation in languages like Java, Scala, Android, C/C++, and Groovy. The tool supports groovy-based Domain Specific Language over XML. Gradle provides building, testing, and deploying software on several platforms.

The tool is popular for building any software and large projects. Gradle includes the pros of Ant and Maven and curbs the cons of both.

Steps To Install Gradle Build Tool on AlmaLinux 9

To complete this guide, you must log in to your server as a root or non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with AlmaLinux 9.

Now follow the steps below.

Install OpenJDK on AlmaLinux 9

First, you need to update your local package index with the following command:

sudo dnf update -y

Then, use the command below to install OpenJDK on your server:

sudo dnf install java-1.8.0-openjdk-devel -y

Verify your Java installation by checking its version:

java -version
openjdk version "1.8.0_352"
OpenJDK Runtime Environment (build 1.8.0_352-b08)
OpenJDK 64-Bit Server VM (build 25.352-b08, mixed mode)

Install Gradle on AlmaLinux 9

At this point, you need to visit the Gradle Releases page and download the latest version on your AlmaLinux 9 server.

Download the Gradle Build Tool

Use the following wget command to download the Gradle in the /tmp directory:

sudo wget -P /tmp

When your download is completed, extract your file in the /opt/gradle directory:

sudo unzip -d /opt/gradle /tmp/gradle-*.zip

Set up Environment Variables

At this point, you need to configure the environmental variable PATH on AlmaLinux 9. To do this, run the command below:

export PATH=$PATH:/opt/gradle/gradle-6.9.3/bin

Verify Gradle Installation

At this point, your Gradle installation is completed, You can verify it by checking its version on AlmaLinux 9:

gradle -v
Welcome to Gradle 6.9.3!

Here are the highlights of this release:
 - This is a small backport release.
 - Java 16 can be used to compile when used with Java toolchains
 - Dynamic versions can be used within plugin declarations
 - Native support for Apple Silicon processors

For more details see

Gradle 6.9.3

Build time:   2022-10-17 07:44:02 UTC
Revision:     a6198e44749b18b37e26b3b3467db17e034bcff4

Kotlin:       1.4.20
Groovy:       2.5.12
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          1.8.0_352 (Red Hat, Inc. 25.352-b08)
OS:           Linux 5.14.0-70.22.1.el9_0.x86_64 amd64

That’s it. The installation has been completed successfully.


At this point, you have learned to Install Gradle on AlmaLinux 9.

If you want to know about our latest content, you can follow the Facebook page of Orcacore.

You may be like these articles:

How To Set up Gradle on Ubuntu 20.04

How To Install MariaDB 10.8 on AlmaLinux 9

Install PostgreSQL 15 on AlmaLinux 9



Please enter your comment!
Please enter your name here

Latest Articles


Most Popular