Skip to content

Instantly share code, notes, and snippets.

@19317362
Forked from parzonka/installantoncentos.sh
Last active October 14, 2022 18:24
Show Gist options
  • Save 19317362/6a3cbf535426fb475d4ff19023ec9110 to your computer and use it in GitHub Desktop.
Save 19317362/6a3cbf535426fb475d4ff19023ec9110 to your computer and use it in GitHub Desktop.
How to install ant on centos
# download and install
antversion=1.10.3
wget http://archive.apache.org/dist/ant/binaries/apache-ant-${antversion}-bin.tar.gz
sudo tar xvfvz apache-ant-${antversion}-bin.tar.gz -C /opt
sudo ln -sfn /opt/apache-ant-${antversion} /opt/ant
sudo sh -c 'echo ANT_HOME=/opt/ant >> /etc/environment'
sudo ln -sfn /opt/ant/bin/ant /usr/bin/ant
# check installation
ant -version
#cleanup
rm apache-ant-${antversion}-bin.tar.gz
@ap1438
Copy link

ap1438 commented Mar 1, 2022

Use tar -xvzf apache-ant-${antversion}-bin.tar.gz -C /opt
instesd of xvfvz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment