linux安装maven

1、安装wget命令

yum -y install wget

2、下载maven安装包

wget http://mirrors.cnnic.cn/apache/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz

image

3.解压maven安装包

tar -zxvf apache-maven-3.5.4-bin.tar.gz

Alt text

4.配置maven

vi /etc/profile

在配置文件配置

export MAVEN_HOME=/opt/apache-maven-3.5.4
export PATH=$MAVEN_HOME/bin:$PATH

image

配置文件生效

source /etc/profile

5.查看maven

mvn -version
posted @ 2023-06-29 10:36  ghostmen  阅读(96)  评论(0)    收藏  举报