First, download the latest maven3.2.2, address: http://mirrors.cnnic.cn/apache/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz
[Email protected] ~]$wgethttp//mirrors.hust.edu.cn/apache/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz................... Omitted.......................................... To omit ... or to be ....... .....98% [=========================================================================================>]6,865,739 -.6k/s ETA (Central United Kingdom time
99% [=========================================================================================>]6,883,491 in.7k/s ETA (Central United Kingdom time
99% [=========================================================================================>]6,901,307 in.2k/s ETA (Central United Kingdom time
99% [=========================================================================================>]6,912,251 -.7k/s ETA (Central United Kingdom time
99% [=========================================================================================>]6,917,723 -.9k/s ETA (Central United Kingdom time
99% [=========================================================================================>]6,930,035 -.4k/s ETA (Central United Kingdom time
100%[==========================================================================================>]6,940,967 in.4k/sinch4m 57s
the- -- - the: to:Wuyi(22.9KB/S)-Saved "apache-maven-3.2.2-bin.Tar. gz "[6940967/6940967]
Second, tar decompression apache-maven-3.2.2-bin.tar.gz
tar -zxvf apache-maven-3.2. 2-bin. tar. gz
To configure environment variables:
[[email protected] ~]$VI ~/. BASHRC #. bashrc# Source Global Definitionsifthen c5/>/etc/bashrcfi# User specific aliases and Functionsexport Maven_home=/home/ richard/apache-maven-3.2. 2 export Java_home=/usr/lib/jvm/java-1.6. 0-openjdk-1.6. 0.0 . X86_64path= $PATH: $JAVA _home/bin: $MAVEN _home/binexport PATH
is the environment variable in effect:
Finally, verify that the configuration is correct
[Email protected] richard]$ MVN-Vapache Maven3.2.2(45f7c06d68e745d05611f7fd14efb6594181933e; the- .-17t21:Wuyi: the+ ,:xx) Maven Home:/home/richard/apache-maven-3.2.2Java Version:1.6. 0_30, Vendor:sun Microsystems Inc.java home:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0. x86_64/Jredefault LOCALE:ZH_CN, platform Encoding:utf-8OS Name:"Linux", Version:"2.6.32-431.20.3.el6.x86_64", Arch:"AMD64", Family:"Unix"