1
http://maven.apache.org/download.cgi
2 upload the downloaded apache-maven-3.3.9-bin.tar.gz file to the/temp directory, and then switch to the root user to execute the following command.
tar zxvf apache-maven-3.3. 9-bin. Tar . Gz[email protected]:/temp# CD/Opt[email protected]:mv /temp/apache-maven-3.3. 9 .
3 Creating a soft link
Ln -s/opt/apache-maven-3.3. 9/bin/mvn mvn
4 Adding an environment configuration
[Email PROTECTED]:/OPT/JDK1. 8. 0_92# gedit/etc/profile......export m2_home=/opt/apache-maven-3.3. 9 export PATH=${m2_home}/bin: $PATH ...
Execute the following command to make the configuration file effective
[Email PROTECTED]:/OPT/JDK1. 8. 0_92# source/etc/profile
5 Using other user authentication
[Email protected]:~$ mvn-Vapache Maven3.3.9(BB52D8502B132EC0A5A3F4C09453C07478323DC5; -- One-11t00: A: -+ ,:xx) Maven Home:/opt/apache-maven-3.3.9Java Version:1.8. 0_92, Vendor:oracle Corporationjava home:/opt/jdk1.8.0_92/Jredefault LOCALE:ZH_CN, platform Encoding:utf-8OS Name:"Linux", Version:"4.4.0-22-generic", Arch:"AMD64", Family:"Unix"[email protected]:~$
Ubuntu 16.04 Installation Maven3.3.9