centOS install Maven

[url=https://preilly.me/2013/05/10/how-to-install-maven-on-centos/]centOS install Maven[/url]



$ sudo tar xzf apache-maven-3.0.5-bin.tar.gz -C /usr/local
$ cd /usr/local
$ sudo ln -s apache-maven-3.0.5 maven


Next, set up Maven path system-wide:

$ sudo vi /etc/profile.d/maven.sh


export M2_HOME=/usr/local/maven
export PATH=${M2_HOME}/bin:${PATH}


Finally, log out and log in again to activate the above environment variables.
To verify successful installation of maven, check the version of maven:
$ mvn -version

你可能感兴趣的:(linux,centos,install,maven)