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 xzf <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