Install ant in centos

Source: Internet
Author: User
1. Create a directory for installing ant. Now, we create the ant directory under the/usr directory. 2. Download

CD/usr/ant to enter the Directory and use wget ant to download ant to the current directory. The ant download page (http://ant.apache.org/bindownload.cgi) is provided ).

The author uses the second

3. Extract

Decompress the compressed package file downloaded from tar-zxvf to the current directory.

4. Configure Environment Variables

Make sure that you have installed JDK and then use Vim to edit the/etc/profile file and add ant to the environment variable:

Export ant_home =/usr/ANT/apache-ant-1.9.4export Path = $ java_home/bin: $ android_home/tools: $ android_home/platform-tools/: $ ant_home/bin: $ path
However, when ant-version is used Bash: ant: Command not found.Next, let's proceed to the next step.

5. Link file

Run the CD/usr/bin command to enter the directory. Use the Ln-S-F Android SDK to install the directory/tools/Android and link android to the directory. Now, we can use the ant command in any directory.

Install ant in centos

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.