Install GRADLE in Amazon Linux

 

#!/bin/sh

gradle_version=”4.4-rc-5″

#Your Custom Installation Path

install_target_path=”/opt/gradle”
wget -N https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip
mkdir -p ${install_target_path}
unzip gradle-${gradle_version}-all.zip
mv gradle-${gradle_version} ${install_target_path}/
ln -sfn gradle-${gradle_version} ${install_target_path}/latest
chown -R ec2-user:ec2-user ${install_target_path}
printf “export GRADLE_HOME=${install_target_path}/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin” > /etc/profile.d/gradle.sh
. /etc/profile.d/gradle.sh
# check installation
gradle -v

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s