Installing Ant Under Linux

Unlike the JDK deployment, Ant is unpacked using tar rather than installed using rpm.

Downloading the Distribution

Point your browser to http://jakarta.apache.org/builds/jakarta-ant/release/v1.4.1/bin/ and select the binary tar.gz file. Save the file to /tmp.

Unpacking the Distribution

As root, cd to /usr/local (or another location where you want to deploy packages such as Ant) and then run this command:

[root@linux local]# gunzip -c /tmp/jakarta-ant-1.4.1-bin.tar.gz | tar xf -

This creates the directory /usr/local/jakarta-ant-1.4.1.

Adding Ant to PATH

Create the file /etc/profile.d/ant.sh as root with the following content:

 PATH="$PATH:/usr/local/jakarta-ant-1.4.1/bin" ANT_HOME=/usr/local/jakarta-ant-1.4.1/ export ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.