Installing Ant on Linux

  1. Enter the URL: http://ant.apache.org/bindownload.cgi.
  2. On the Apache Ant Project page, find the heading Current Release of Ant.
  3. Select apache-ant-1.7.1-bin.tar.gz [PGP] [SHA1] [MD5].
  4. Save and extract the package file into a Linux home directory.
  5. Set the ANT_OPTS environment variable.
    export ANT_OPTS="-Xmx256M"
  6. Set the ANT_HOME environment variable to the directory where you installed Ant.
    export ANT_HOME=${ant_dir}
  7. Set the PATH environment variable to include the directory where you installed the Ant bin directory.
    export PATH=${ANT_HOME}/bin:${JAVA_HOME}/bin:${PATH}