Linux/CentOS : Ant 1.8 / 1.9 / install script(.sh)

Because yum will always download old versions.Let's download Ant 1.9 with .sh script.This will do the work:
  1. #make sure opt directory exists
  2. cd /opt/
  3. #download
  4. wget http://mirrors.ispros.com.bd/apache//ant/binaries/apache-ant-1.9.4-bin.zip
  5. #unzip and remove zip(you choice)
  6. unzip apache-ant-1.9.4-bin.zip && rm apache-ant-1.9.4-bin.zip
  7. cd apache-ant-1.9.4/
  8. #create symlinks
  9. ln -s /opt/apache-ant-1.9.4 /opt/ant
  10. ln -s /opt/ant/bin/ant /usr/bin/ant
  11. #add environment variable
  12. echo 'ANT_HOME=/opt/ant' >> /etc/environment
  13. #apply changes on current session
  14. source /etc/environment

Be sure to download wget before running the script
Download script Install Ant 1.9.sh

No comments:

Post a Comment