This tutorial will guide you through the process of installing Apache Ant on a Fedora Server.
Before installing Apache Ant, it's always a good practice to update the system to the latest version.
sudo dnf -y update
Apache Ant requires Java Development Kit (JDK) to be installed on the system. Check if you have Java installed by running the command:
java --version
If Java is not installed, install it using the following command:
sudo dnf -y install java-devel
Navigate to the Apache Ant website at https://ant.apache.org/. Under downloads, find the latest version of Ant and copy the link address.
In the terminal, use the wget command to download Ant to your server:
cd /opt
sudo wget <paste the copied link>
Once the download is complete, extract the tar file using the following command:
sudo tar -xvf apache-ant-<version>-bin.tar.gz
Now you need to add /opt/apache-ant-
Open the /etc/profile file:
sudo nano /etc/profile
Add the following lines at the end of the file:
# Apache Ant
export ANT_HOME=/opt/apache-ant-<version>
export PATH=$PATH:$ANT_HOME/bin
Reload the profile for the changes to take effect:
source /etc/profile
Test the installation by running the following command:
ant -version
You should see the Ant version number displayed in the terminal.
Congratulations! You have successfully installed Apache Ant on your Fedora Server. You can now start using Ant to build Java applications.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!