1. Download Maven
Maven:Http://maven.apache.org/download.cgi
I downloaded: apache-maven-3.1.0-bin.tar.gz
2. Move your own storage directory
Bixiaopeng @ bixiaopeng-to-be-filled-by-O-E-M :~ /Download $ MV apache-maven-3.1.0-bin.tar.gz/home/bixiaopeng/soft/jarsbixiaopeng @ bixiaopeng-to-be-filled-by-O-E-M :~ /Download $ CD/home/bixiaopeng/soft/jars
3. Extract
Bixiaopeng @ bixiaopeng-to-be-filled-by-O-E-M :~ /Soft/jars $ tar-zxvf apache-maven-3.1.0-bin.tar.gz # view the extracted results of bixiaopeng @ bixiaopeng-to-be-filled-by-O-E-M :~ /Soft/jars $ LS-Al apache-maven-3.1.0/total usage 44drwxrwxr-x 6 bixiaopeng 4096 August 21 14:29. drwxrwxr-x 3 bixiaopeng 4096 August 21 14:29 .. alibaba-x 2 bixiaopeng 4096 August 21 14:29 Alibaba-x 2 bixiaopeng release 4096 August 21 14:29 bootdrwxr-XR-x 3 bixiaopeng release 4096 June 28 10:12 Alibaba-XR-x 3 bixiaopeng 4096 June 28 10:12 lib-RW-r -- 1 bixiaopeng 11358 10:12 license.txt-RW-r -- 1 bixiaopeng 1112 10:12 notice.txt-RW-r -- 1 bixiaopeng 2513 june 28 10:12 readme.txt
4. Configure Maven Environment Variables
Vim ~ /. Bashrc
# Add at the bottom of the file
Export maven_home =/home/bixiaopeng/soft/jars/apache-maven-3.1.0export path =$ {maven_home}/bin: $ path
5. Make the repair take effect immediately after the repair is completed
bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~/soft/jars$ source ~/.bashrc
6. Check the version.
bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~/soft/jars$ cd ~bixiaopeng@bixiaopeng-To-be-filled-by-O-E-M:~$ mvn -vApache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-28 10:15:32+0800)Maven home: /home/bixiaopeng/soft/jars/apache-maven-3.1.0Java version: 1.6.0_45, vendor: Sun Microsystems Inc.Java home: /home/bixiaopeng/soft/jvm/jdk/jreDefault locale: zh_CN, platform encoding: UTF-8OS name: "linux", version: "3.8.0-27-generic", arch: "amd64", family: "unix"