Icarus answered a very similar question for me. Its not using “yum”, but should still work for your purposes. Try,
wget http://mirror.olnevhost.net/pub/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
basically just go to the maven site. Find the version of maven you want. The file type and use the mirror for the wget statement above.
Afterwards the process is easy
- Run the wget command from the dir you want to extract maven too.
-
run the following to extract the tar,
tar xvf apache-maven-3.0.5-bin.tar.gz -
move maven to /usr/local/apache-maven
mv apache-maven-3.0.5 /usr/local/apache-maven -
Next add the env variables to your ~/.bashrc file
export M2_HOME=/usr/local/apache-maven export M2=$M2_HOME/bin export PATH=$M2:$PATH -
Execute these commands
source ~/.bashrc
6:. Verify everything is working with the following command
mvn -version