Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install Gradle on Debian 11 - DesignLinux

Nov 29 2022
designlinux 0 Comments
how-to-install-gradle-on-debian-11

Gradle is free and open-source build tool used for the Java projects. It is flexible and helps developers team to automate and build easier and faster software. In this tutorial we will explain how to install Gradle on Debian 11 Bullseye.

How to Install Gradle on Debian 11#

Follow the below given steps to install Gradle on Debian 11 system. Before that make sure that you are log in as root or user with sudo privileges.

Step 1 – Updating you system

First of all, you need to ensure that all the packages on your system are up to date. Run the below given command:

sudo apt update && sudo apt upgrade -y

Step 2 – Install Java

The base of the Gradle is Java, so Java JDK must be installed on your system. To install OpenJDK run the following command:

sudo apt install default-jdk -y

The installation process may take some time.

After that, verify the installation of by checking it’s version using below given command:

java -version

The output should look something like this:

openjdk version "11.0.16" 2022-11-17
OpenJDK Runtime Environment (build 11.0.16+8-post-Debian-1deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Debian-1deb10u1, mixed mode, sharing)

Step 3 – Downloading Gradle

After the installing Java on your system, download the latest Gradle distribution release binary file from its official download page. At the time of writing this tutorial, the latest version of Gradle is 7.6.

Issue the following wget command to download the Gradle binary file:

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

After that extract the zip file to the /opt/gradle directory:

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

To verify that the Gradle files are extracted run below given command:

ls /opt/gradle/gradle-*
bin  init.d  lib  LICENSE  NOTICE  README

The Gradle build tool has been configured on your Debian 11 system.

Step 4 – Setup the Environment Variables

At this state, we will setup Gradle with PATH environment variable to include the Gradle bin directory.

Open your text editor and create a new file with name gradle.sh under the /etc/profile.d directory.

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

Add the following configuration:

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

Save and close the file.

Make the script executable by running the following chmod command:

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

Now source the script to apply environment for current shell.

source /etc/profile.d/gradle.sh

That’s it, Grandle is installed on Debian 11 system.

Step 5 – Verify Gradle Installation

Execute the below given command to verify that Gradle is installed properly by checking it’s version:

gradle -v

It should show something like the following:

Welcome to Gradle 7.6!

...

Conclusion#

You successfully learned how to install Gradle on Debian 11, Bullseye. To know more about Gradle visit official Gradle Documentation page.

If you have any question or feedback, please leave a comment below.

Related

Tags: debian, gradle, java

How to Access a Remote Server Using a SSH Jump Host

Prev Post

How to Install Elasticsearch on Ubuntu 22.04

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 0
  • 485
  • 1,055,257

DesignLinux.com © All rights reserved

Go to mobile version