linux下maven的安装

  • 上传安装包到相应路径

  • 进行解压

    • tar -zxvf apache-maven-3.0.5-bin.tar.gz -C /export/servers/
  • 修改环境变量

    • vim /etc/profile

      • #maven
        export MAVEN_HOME=/export/servers/apache-maven-3.0.5
        export PATH=$PATH:$MAVEN_HOME/bin
        
    • source /etc/profile

  • 查看是否安装成功

    • mvn -version

    • 显示如下信息
      Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 21:51:28+0800)
      Maven home: /export/servers/apache-maven-3.0.5
      Java version: 1.8.0_65, vendor: Oracle Corporation
      Java home: /export/servers/jdk1.8.0_65/jre
      Default locale: en_US, platform encoding: UTF-8
      OS name: "linux", version: "2.6.32-573.el6.x86_64", arch: "amd64", family: "unix"
      

你可能感兴趣的:(linux,java)