1.下载maven

https://maven.apache.org/download.cgi

2.解压到指定目录  /usr/local/apache-maven-3.6.3

3.打开终端,输入vim ~/.bash_profile

export MAVEN_HOME=/usr/local/apache-maven-3.6.3
export PATH=$PATH:$M2_HOME/bin

添加完之后,按esc,执行:wq保存退出

4.执行 source ~/.bash_profile 为配置环境变量生效

5.测试 mvn -v   查看是否出现maven版本

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-10
  • 2021-12-23
  • 2021-07-09
  • 2022-01-09
  • 2021-07-30
  • 2022-12-23
猜你喜欢
  • 2021-04-13
  • 2022-01-20
  • 2021-05-26
  • 2022-12-23
  • 2021-12-02
  • 2021-10-24
  • 2022-12-23
相关资源
相似解决方案