Centos7 安装 Maven-3.5.4

教程见右:https://www.howtoforge.com/tutorial/centos-apache-maven/

脚本见下:

yum install java-1.8.0-openjdk-devel.x86_64
cd /usr/local/src
wget http://www-us.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
tar -xf apache-maven-3.5.4-bin.tar.gz
rm -f apache-maven-3.5.4-bin.tar.gz
mv apache-maven-3.5.4/ apache-maven/
cd /etc/profile.d/
echo -e "export M2_HOME=/usr/local/src/apache-mavennexport PATH=${M2_HOME}/bin:${PATH}" >maven.sh
chmod +x maven.sh
source /etc/profile.d/maven.sh
mvn -v

 

分享到:更多 ()