31 lines
406 B
Markdown
31 lines
406 B
Markdown
|
下载解压安装包
|
||
|
```
|
||
|
cd /usr/local
|
||
|
```
|
||
|
```
|
||
|
wget https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
|
||
|
```
|
||
|
```
|
||
|
tar -zvxf apache-maven-3.9.6-bin.tar.gz
|
||
|
```
|
||
|
|
||
|
配置环境变量
|
||
|
```
|
||
|
vim /etc/profile
|
||
|
```
|
||
|
|
||
|
添加以下内容
|
||
|
```
|
||
|
export MAVEN_HOME=/usr/local/apache-maven-3.9.6
|
||
|
export PATH=${MAVEN_HOME}/bin:${PATH}
|
||
|
```
|
||
|
|
||
|
刷新
|
||
|
```
|
||
|
source /etc/profile
|
||
|
```
|
||
|
|
||
|
验证
|
||
|
```
|
||
|
mvn -v
|
||
|
```
|