RSS

Installing Maven On CentOS

05 Apr

These are the simple sequences for making maven work on a CentOS machine.

Pre-requisite : Java to be installed, check using java -version

1. Download the current maven version from the prescribed repository, http://maven.apache.org/download.html. I use to work with maven version 2.0.11 and hence downloaded using,

> wget http://www.eng.lsu.edu/mirrors/apache//maven/binaries/apache-maven-2.0.11-bin.tar.gz

Please wait while it is downloaded as a tar archive.

2. Extract the archive to the desired maven home directory, which can be a common, /usr/local/

So move the downloaded apache-maven-2.0.11-bin.tar.gz to /usr/local/ path using mv command or a short way can be use the wget command told before after going to the /usr/local/ path. Any way no issues..

> mv apache-maven-2.0.11-bin.tar.gz /usr/local

> cd /usr/local

> tar -zxvf apache-maven-2.0.11-bin.tar.gz

This will extract the apache-maven-2.0.11 directory into /usr/local/

3. Create sym link..

> ln -s apache-maven-2.0.11 maven

4. Open ~/.bashrc file with vi ~/.bashrc and add the following lines to the end of the file,

export M2_HOME=/usr/local/apache-maven-2.0.11
export PATH=${M2_HOME}/bin:${PATH}

5. AT last execute the environment changes with the command,    

> . ~/.bashrc

Check the installation with,

> mvn -version

 
5 Comments

Posted by on April 5, 2011 in CentOS, maven

 

Tags: , , , , , ,

5 responses to “Installing Maven On CentOS

  1. Falci2

    August 5, 2012 at 1:22 am

    Thankssss!!

     
  2. Nii

    September 12, 2012 at 4:43 pm

    Thanks!!

     
  3. fqureshi

    November 20, 2012 at 8:47 pm

    Thanks for the guide. It has helped me installed maven successfully. Great work!

     
  4. Arnoldo

    June 13, 2013 at 12:34 am

    Heya exceptional website! Does running a blog such as this require a great
    deal of work? I have absolutely no knowledge of
    computer programming however I had been hoping to start my own blog in the near future.
    Anyway, if you have any recommendations or tips for new blog owners please share.
    I understand this is off topic nevertheless I just had to
    ask. Appreciate it!

     
  5. Youtube.Com

    July 25, 2013 at 7:31 pm

    Definitely believe that which you stated. Your favorite reason seemed to be on the net the easiest factor to be mindful
    of. I say to you, I certainly get irked while other
    folks think about concerns that they plainly do not realize about.
    You managed to hit the nail upon the top and outlined
    out the whole thing without having side effect , other folks could take a signal.
    Will likely be back to get more. Thanks

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: