Install Maven 3.3.3 – Centos 6.7

You need Java JDK installed, see this link Install Java JDK 1.8

Download the package from:

Move the compressed archive to the location you want and extract.

cd /opt



mv apache-maven-3.3.3 maven

Create the following symlink: (note: /opt/maven is where I extracted the archive on this server)

ln -s /opt/maven/bin/mvn /usr/bin/mvn

Create a file under /etc/profile.d/ and fill it with the following based on where you extracted the maven archive.

export CLASSPATH=.

Make this file executable:

chmod +x /etc/profile.d/

Issue the following to make the variables permanent:

source /etc/profile.d/

Reboot. Issue the following to verify that it’s correctly installed:

mvn -version

You should see something like the following to signal that it’s successfully done:

Java version: 1.8.0_51, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-573.7.1.el6.x86_64", arch: "amd64", family: "unix"


Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.