Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»General Articles»How to Install Gradle on CentOS 7

    How to Install Gradle on CentOS 7

    RahulBy RahulJanuary 19, 20202 Mins ReadUpdated:April 19, 2020

    Gradle is an open-source build tool for the automation of applications. The Gradle helps developers team to build, automate and deliver software easier and faster. This tutorial will help you to install Gradle on CentOS/RHEL 7 operating system.

    You may like:

    • How to Install Apache Maven on CentOS 8

    Prerequisites

    The Gradle requires Java 8 or higher version installed on system. Generally Fedora system have default installed Java version on it. to run Java 8 or higher version. Make sure you have java installed on your CentOS/RHEL system. If not, use following command to install it.

    sudo yum install java-1.8.0-openjdk
    

    Verify installed Java version on your system.

    java -version
    
    openjdk 11.0.6 2020-01-14 LTS
    OpenJDK Runtime Environment 18.9 (build 11.0.6+10-LTS)
    OpenJDK 64-Bit Server VM 18.9 (build 11.0.6+10-LTS, mixed mode, sharing)
    

    Install Gradle on CentOS 7

    Once you installed Java on your system. Download the latest Gradle distribution release binary file from its official download page.

    wget https://downloads.gradle-dn.com/distributions/gradle-6.3-bin.zip
    

    Then extract the downloaded archive and place it to the proper location. Generally, I used /usr/local directory for storing applications. You can use alternative directory like /opt.

    unzip gradle-6.3-bin.zip
    mv gradle-6.3 /usr/local/gradle
    

    Gradle has been configured on your system.

    Setup Environment for Gradle

    Now, you need to setup Gradle with PATH environment variable, Also make sure the variable is set after system reboot.

    Place a shell script under profile.d directory to set PATH variable on reboot. Create a file like below:

    vim /etc/profile.d/gradle.sh
    

    and add the below line to file

    export PATH=/usr/local/gradle/bin:$PATH
    

    Save file and close it. Now source the script to apply environment for current shell.

    source /etc/profile.d/gradle.sh
    

    And you have completed the Grandle installation on your CentOS 7 or RHEL 7 system.

    Check Gradle Version

    Once you finished the Gradle installation, let’s check the installed version on your system.

    gradle -v
    

    Output

    ------------------------------------------------------------
    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:          14 (Oracle Corporation 14+36-1461)
    OS:           Linux 4.15.0-66-generic amd64
    

    If you see the results like above, means Gradle is successfully installed and configured on your CentOS 7 system.

    Build Tool CentOS 7 Gradle
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Preserve Directory Path with CP Command
    Next Article How to Create Swap in Linux

    Related Posts

    How to Find Django Install Location in Linux

    Updated:April 27, 20221 Min Read

    (Resolved) – ReactJS 404 Error on Page Reload

    2 Mins Read

    Adding a New SSH Key in GitHub

    Updated:April 1, 20223 Mins Read

    13 Best Linux Terminal Emulators and Bash Editors

    8 Mins Read

    How To Install Oracle VirtualBox on Debian 11

    2 Mins Read

    10 Best Linux FTP Clients in 2022

    5 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    • (Resolved) Please install all available updates for your release before upgrading
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.