CentOS上用yum安装Maven

centos 上yum安装Maven

  • yum安装

    sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
    sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
    sudo yum install -y apache-maven
    
  • 安装完毕,查看安装位置

    mvn -version
    
  • 添加阿里云的镜像地址

    vi /usr/share/apache-maven/conf/settings.xml
    
  • 修改下面节点

    
      alimaven
      aliyun maven
      http://maven.aliyun.com/nexus/content/groups/public/
      central
    
    
  • 配置仓库位置

    /cicro/var/m2/repo
    

你可能感兴趣的:(CentOS上用yum安装Maven)