環境
OS : Linux CentOS 5.9
前提
Javaがインストールされていること
Javaにパスを通しておく
Gradle使うユーザの ~/.bash_profile
export JAVA_HOME=`readlink /etc/alternatives/java | sed -e 's/\/bin\/java//g'
`反映
source ~/.bash_profile
確認
java -version
Gradleインストール
ダウンロード
https://gradle.org/gradle-download/ より最新を確認し
wget https://services.gradle.org/distributions/gradle-3.1-all.zip --no-check-certificate
解凍
unzip gradle-3.1-all.zip -d /usr/local/
シンボリックリンク作成
ln -s /usr/local/gradle-3.1 /usr/local/gradle
パス通ったか確認
ll /usr/local/gradle/bin/
Gradleにパスを通す
vi ~/.bash_profile
export PATH=$PATH:/usr/local/gradle/bin
反映
source ~/.bash_profile
確認
gradle -v