Linux Manen 安装

  • 下载maven安装包
wget  http://mirror.bit.edu.cn/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz
  • 执行解压
tar vxf apache-maven-3.6.1-bin.tar.gz
mv apache-maven-3.6.1 /usr/local/maven
  • 使用阿里镜像
vim /usr/local/maven/conf/settings.xml

    alimaven
    aliyun maven
    http://maven.aliyun.com/nexus/content/groups/public/
    central        
 
  • 添加环境变量
vi /etc/profile
  • 添加安装目录
MAVEN_HOME=/usr/local/maven
export MAVEN_HOME
export PATH=${PATH}:${MAVEN_HOME}/bin
  • 刷新环境
source /etc/profile
  • 验证安装成功
mvn –v

你可能感兴趣的:(Linux Manen 安装)