From dd5768a80c84b105ee8fd8dcea1f0ed03f063fb1 Mon Sep 17 00:00:00 2001 From: 8ga Date: Fri, 10 Jan 2025 11:10:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20ubuntu-maven.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ubuntu-maven.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ubuntu-maven.md 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