1.去官网知道相应版本的ant工具:https://ant.apache.org/bindownload.cgi
2.下载ant安装包
wget http://mirrors.tuna.tsinghua.edu.cn/apache//ant/binaries/apache-ant-1.10.6-bin.tar.gz
3.解压,重命名
tar -zxvf apache-ant-1.10.6-bin.tar.gz;mv apache-ant-1.10.6 ant
4.验证
ant -version