diff --git a/ubuntu-maven.md b/ubuntu-maven.md new file mode 100644 index 0000000..998e632 --- /dev/null +++ b/ubuntu-maven.md @@ -0,0 +1,31 @@ +下载解压安装包 +``` +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 +``` \ No newline at end of file