Installing Maven on Cent-OS

Apache Maven is project management tool, which provides facility to clean, build, install, deploy projects.

To Install Maven on Cent-OS –
1. Install JDK 1.6
Please note that, you are installing JDK not JRE.

2.Go to Terminal and execute following commands.

$ wget http://mirror.cc.columbia.edu/pub/software/apache/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz
$ sudo tar xzf apache-maven-3.0.4-bin.tar.gz -C /usr/local
$ cd /usr/local
$ sudo ln -s apache-maven-3.0.4 maven

Now We need to set maven path, for that-

$ sudo vi /etc/profile.d/maven.sh

Add following lines in opened file.

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

To check whether maven is successfully installed-

$ mvn -version
Advertisements

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