Setting up Maven in Linux
Download maven from http://maven.apache.org/download.cgi
Extract in any location say /opt
Append following lines in .bashrc and save it.
export M2_HOME=/opt/apache-maven-3.1.1/
PATH=$M2_HOME/bin:$PATH
4. open terminal and below command execute
source ~/.bashrc
...