Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've installed ANT via yum but it's to old of a version. Not sure how to install it on it's own.

share|improve this question

closed as off topic by Chris S Jul 20 '12 at 23:12

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers 3

up vote 1 down vote accepted

As Khaled said you can install from source. This is what I do -

I have a directory structure like

/opt/java/apache/

Under which I have the apache-ant-X.X.X source directory

Then I create a symbolic link to the above: ln -s apache-ant-X.X.X ant resulting in

/opt/java/apache/ant

(Similarly I have downloaded the JDK and created a symbolic link at /opt/java/jdk)

Then I create /etc/profile.d/java.sh which contains:

export JAVA_HOME=/opt/java/jdk
export ANT_HOME=/opt/java/apache/ant
export PATH=${JAVA_HOME}/bin:${ANT_HOME}/bin:${PATH}

Hope this helps.

share|improve this answer

For any open source package, you can always download the latest version from the package's website. Then, you can build your own rpm file or install it directly from source.

If you are lucky, you may find an already built rpm for you. Try to search for one!

share|improve this answer
    
Here's a good resource for fidning rpm: rpm.pbone.net. It shows that ant-1.8 is available for CentOS/RHEL 5 via jpackage repo. –  rvs Mar 24 '12 at 8:59

If you want to use yum, and still get the most up-to-date package, you need to update you yum configuration files to find RPMs in the vendor repository (Apache here). Many of the vendors has a RPM in their site that sets this configuration for you.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.