Centos 7 配置maven
1. maven下载
下载地址: https://maven.apache.org/download.cgi
保存到目录(个人习惯/usr/local/src)
cd /usr/local/src/ wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
2. 解压
tar xzvf apache-maven-3.6.3-bin.tar.gz
3. 编辑/etc/profile, 将maven添加至环境变量,添加如下两行,保存
export MAV_HOME=/usr/local/src/apache-maven-3.6.3/ export PATH=$PATH:${MAV_HOME}/bin
4. 使环境变量生效
source /etc/profile
5. 检查maven版本,查看配置是否成功
[ apache-maven-3.6.3]# mvn -version Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: /usr/local/src/apache-maven-3.6.3 Java version: 11.0.1, vendor: Oracle Corporation, runtime: /usr/local/jdk-11.0.1 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.10.0-1062.1.2.el7.x86_64", arch: "amd64", family: "unix"
相关推荐
changecan 2020-11-19
ECSHOP专属建设 2020-11-13
88427810 2020-11-02
步知道 2020-10-27
Junzizhiai 2020-10-10
jackalwb 2020-10-05
小网管 2020-09-03
shiwenqiang 2020-09-14
85251846 2020-09-14
summerinsist 2020-08-21
87901735 2020-08-19
PinkBean 2020-08-11
85407718 2020-08-09
MichelinMessi 2020-07-30
suosuo 2020-07-28
CARBON 2020-07-28
lizhengfa 2020-07-27
88427810 2020-07-26