Installing
- Download Apache Maven 3.x Binaries:
-
Double-Click on Maven Archive to Extract
-
Relocating Maven Binaries
Switch to the Target directory:cd ~
Then Login as Super-user:
sudo su
If Got “User is Not in Sudoers file” then Look: Solution
Remove the tar.gz archive:rm Downloads/apache-maven*bin.tar.gz
Fix Permissions:
chown -R root:wheel Downloads/apache-maven*
Switch the Maven contents:
mv Downloads/apache-maven* /opt/apache-maven
Achieve the Admin session:
exit
-
Add Maven Binaries to User Path
nano $HOME/.profile
Append:
export PATH=$PATH:/opt/apache-maven/bin
Change the [X.Y.Z] with the actual Maven Version!
Ctrl+x to Save and Exit from “nano” 🙂
To Load the New SetUp:source $HOME/.profile