maven安装与删除
1、下载、解压
wget http://mirrors.shu.edu.cn/apache/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz
tar -zxvf apache-maven-3.6.0-bin.tar.gz
2、复制安装路径、编辑环境变量、编辑后生效
/opt/app/apache-maven-3.6.0
vim /etc/profile
export M2_HOME=/opt/app/apache-maven-3.6.0
export PATH=$M2_HOME/bin:$PATH
source /etc/profile
```t
注:i :wq保存后退出; :q退出不保存
3、查看maven版本
mvn -v
![image.png](https://img.haomeiwen.com/i15866605/8365b01781232ce2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
删除
![image.png](https://img.haomeiwen.com/i15866605/28a024efa0ba3d86.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
网友评论