How to Install Gradle on Debian 10
Install Gradle on Debian 10
- System update
- Install Java SE
- Download Gradle binaries
- Extract the Gradle file
- Set environment variables
The first step is to open a Terminal (shell) window or connect to your Debian system's console using SSH.
You're learning how to install Gradle on Debian 10 via Terminal, which can be launched by searching for it in the Activities search bar . The newly opened Terminal window is shown below:
A new Terminal window opens
System update
Before continuing to install Gradle on Debian 10, update the system using the command below, then press the Enter key :
sudo apt update
This is also shown in the following image:
System update command
Once your Debian 10 system has updated all the required packages, you should be able to see the following screen on the Terminal window:
System update
Install Java SE
Now, you need to have Java Standard Edition (SE) on your Debian 10 system. This can be done by entering the following command in Terminal and then pressing the Enter key :
sudo apt install default-jdk
During the process of handling this command, your Debian 10 system needs to be sure that you are really ready to install the command. You can type 'Y' and then press the Enter key if you are sure to continue with the Java SE installation:
Confirm the installation of Java SE
This entire process will take a few minutes to complete, after which you should be able to see the results displayed in Terminal:
The results show up in Terminal
Up to now, Java SE has been successfully installed on your Debian 10 system. If you want to verify that it is actually installed, then you can do so with the help of the following command:
java -version
Successful execution of this command will result in the Java SE version displayed.
Download Gradle binaries
The next step is to download Gradle binaries on a Debian 10 system. This can be done by entering the following command in Terminal and then pressing the Enter key :
wget https://services.gradle.org/distributions/gradle-6.3-bin.zip -P /tmp
If you get the error message running this command, then the wget command is most likely not activated on a Debian 10 system. Wget can be activated by typing the following command and pressing the Enter key :
sudo apt-get install wget
Once the wget command is successfully installed, you can conveniently run the above command. Once Gradle has been successfully downloaded on a Debian 10 system, you should see the results displayed in the Terminal:
Gradle has been successfully downloaded on a Debian 10 system
Extract the Gradle file
Since the Gradle file you just downloaded is in binary format, the next thing to do is unzip it. This can be done simply with the help of the following command:
sudo unzip –d /opt/gradle /tmp/gradle-*.zip
Running this command will extract the files from the tmp directory and save them in the opt directory . Now the Debian 10 system will do some processing, then the Terminal window will look like this:
Extract the Gradle file
To verify if the extraction was performed successfully, you can try to display the contents of the extracted folder with the help of the following command:
ls /opt/gradle/gradle-*
If the Gradle files have been successfully extracted, you should be able to see them in Terminal.
Set environment variables
Now, you need to set the environment variables by creating a new file called gradle.sh with the help of the following command:
sudo nano /etc/profile.d/gradle.sh
After creating this file, add the content shown in the following image to the newly created file. Then save the file and close it.
Now, you need to make this newly created file executable by running the following command:
sudo chmod +x /etc/profile.d/gradle.sh
Next, run the following command in Terminal to load the newly set environment variables:
source /etc/profile.d/gradle.sh
Gradle has now been successfully installed on your Debian 10 system.
To verify that, simply enter the following command in Terminal, then press the Enter key :
gradle -v
Gradle has been successfully installed on your Debian 10 system!
You should read it
May be interested
- How to install NVM on Debiannvm stands for node version manager. with nvm, you can manage multiple node.js instances of nodejs and switch between them without uninstalling and reinstalling the node.
- Notable changes and additions in Debian 11 'Bullseye'debian is one of the oldest, most stable and flexible linux distributions in the free and open source world.
- Do not destroy the Debian system!debian is a powerful and reliable system, but new users are still very easy to ruin the system, by not doing everything the way debian does.
- Debian 10 Buster, New features in Debian 10 Busterdebian 10 buster has been released. let's explore the new features in debian 10 buster through the following article!
- How to Restart Debian Using the Command Linethe linux operating system can run without a reboot not only for a few weeks but for years. but sometimes there's a good reason to reboot your linux system after a week or two, depending on the situation.
- 9 best Debian-based Linux distributionsfortunately, debian's flexibility has made it a good base for other distributions, providing a more pleasant experience for those new to linux.
- Configure mouse settings on the Debian systemdebian allows you to create as many configurations as possible in the system modules. in this article, tipsmake.com will describe how to configure mouse settings on a debian system.
- How to install and configure Samba on Debiansamba is a powerful open source tool that allows windows-like file and printer sharing on the network in linux systems.
- How to reset the password for sudo in Debianthe user password is changed in debian using the passwd command. in this article, tipsmake.com will explain how root users can change their own passwords on debian servers.
- How to upgrade from Debian 11 'Bullseye' to Debian 12 'Bookworm'if you are already using debian 11 bullseye, you can directly upgrade to debian 12 bookworm from the terminal.