Tuesday, 5 April 2016

How to install Ant on Linux ?


Step 1.
Download ant from Apache http://ant.apache.org/bin/download.cgi

Step 2.
Login to your Linux box and create a directory "ant" under /usr/local.
[root@RoseIndiaLinux local]# mkdir ant
[root@RoseIndiaLinux local]# cd ant
[root@RoseIndiaLinux ant]# pwd
/usr/local/ant

Step 3.
Copy apache-ant-1.7.1-bin.zip onto your Linux box in /usr/local/ant directory.

Step 4.
Extract the zip file apache-ant-1.7.1-bin.zip using unzip command.
[root@RoseIndiaLinux ant]# unzip apache-ant-1.7.1-bin.zip
It will extract the content of the zip file and will create a new directory apache-ant-1.7.1

Step 5.
Set path in the .bash_profile
Open the file /root/.bash_profile and add the following codes:
export ANT_HOME=/usr/local/ant/apache-ant-1.7.1
export JAVA_HOME=/opt/java/jdk1.6.0_06
export PATH=${PATH}:${ANT_HOME}/bin

Step 6.
Logout and login again to your Linux box. Now, Ant will be available on your box.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.