Ubuntu 安装 Maven
基于Docker结合Canal实现MySQL实时增量数据传输
Maven
下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
更多版本下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/maven/
安装 & 配置
下载:
$ wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
解压缩
$ tar zxvf apache-maven-3.6.1-bin.tar.gz
转移至固定目录(可根据情况调整)
$ # 推荐放在 /usr/local/maven 下
$ mkdir /usr/local/maven
$ sudo mv apache-maven-3.6.1 /usr/local/maven/
配置环境变量
$ # 这一步的目的是让系统可以通过 PATH 找到 maven 的可执行文件
$ echo "MAVEN_HOME=/usr/local/maven/apache-maven-3.6.3" >> ~/.bashrc
$ echo "PATH=\${PATH}:\${MAVEN_HOME}/bin" >> ~/.bashrc
$ echo "export PATH" >> ~/.bashrc
$ source ~/.bashrc
检查是否安装成功
$ mvn -v
Maven home: /usr/local/maven/apache-maven-3.6.3
Java version: 1.8.0_242, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-62-generic", arch: "amd64", family: "unix"
最后修改于 2020-04-06
此篇文章的评论功能已经停用。