RHEL5.7
1.下载
ant各版本下载地址
http://ant.apache.org/bindownload.cgi
历史版本
http://archive.apache.org/dist/ant/binaries/
2.解压到/usr/local
cd /usr/local
tar xvf apache-ant-1.7.1-bin.tar.gz
ln -s apache-ant-1.7.1 ant
3.设置环境
设置环境变量,在/home/admin/.bash_profile或/etc/profile后添加
#ant
export ANT_HOME=/usr/local/ant
export PATH=$PATH:/usr/local/ant/bin
临时设置
[root@dev local]# export ANT_HOME=/usr/local/ant
[root@dev local]# export PATH=$PATH:/usr/local/ant/bin
4.测试:
[root@dev local]# ant -version
Apache Ant version 1.7.1 compiled on June 27 2008
win7 ANT下载配置
http://happyqing.iteye.com/blog/1891791
参考:
http://blog.sina.com.cn/s/blog_6f505d710100s42z.html