Install maven3 on centOS
This tutorial is to show you how to install maven3 on centos5.6.
1. Download directly to centos using ‘wget’ command.
# wget http://www.alliedquotes.com/mirrors/apache//maven/binaries/
apache-maven-3.0.4-bin.tar.gz
apache-maven-3.0.4-bin.tar.gz
OR you can download it from the official website of apache maven.
2. Change permissions using chmod command.
# chmod 700 apache-maven-3.0.4-bin.tar.gz
3. Unzip/Extract your .tar.gz file.
# tar xzf apache-maven-3.0.4-bin.tar.gz
4. Moving it to /usr/local directory.
# mv apache-maven-3.0.4 /usr/local [assume apache-maven-3.0.4 is under current directory]
5.Creating symbolic link using ln command.
# cd /usr/local
# ln -s apache-maven-3.0.4 maven
# ln -s apache-maven-3.0.4 maven
6. Setup MAVEN_HOME.
#cd ~
# sudo vim /etc/profile
7. Add following at the bottom of .bashrc file.
export MAVEN_HOME=/usr/local/maven
export MAVEN_PATH=$MAVEN_HOME/bin
export PATH=$MAVEN_PATH:$PATH
export MAVEN_PATH=$MAVEN_HOME/bin
export PATH=$MAVEN_PATH:$PATH
Save the changes by pressing escape key and then :wq!.
8 Execute the changes in .bashrc
# source /etc/profile
9. Check maven installed correctly or not.
# mvn –version
Apache Maven 3.0.4 (r801777; 2009-08-06 23:16:01+0400)
Java version: 1.6.0_24
Java home: /opt/jdk1.6.0_24/jre
Default locale: en_US, platform encoding: UTF-8
OS name: “linux” version: “2.6.18-194.26.1.el5.028stab070.14″ arch: “amd64″ Family: “unix”
Java version: 1.6.0_24
Java home: /opt/jdk1.6.0_24/jre
Default locale: en_US, platform encoding: UTF-8
OS name: “linux” version: “2.6.18-194.26.1.el5.028stab070.14″ arch: “amd64″ Family: “unix”
Thank you for this tutorial! Worked great!!
ReplyDeleteThis was the easiest maven tutorial I have found! Thanks so much.
ReplyDelete