How to install Maven on CentOS

Steps to install and configure Maven on CentOS Download the tar.gz file from Apache Maven site Untar the file at some location (Eg: /opt/maven) tar x z f <filename> Add the environment variable to ~/.bash_profile file cd $HOME vi ~/.bash_ profile Append PATH variable with maven path Add M2_HOME variable export M2_HOME Save and restart your system Verify maven installation mvn --version