yum安装Maven

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了yum安装Maven相关的知识,希望对你有一定的参考价值。

安装maven
# 获取maven的yum源
#>wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
#>sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo

# 安装maven
#> yum install -y maven

技术图片

配置阿里镜像仓库

#>vim setting.xml
#定位到mirrors节点下添加下面配置
        <!--阿里云镜像仓库 -->
     <mirror>
        <id>nexus-aliyun</id>
        <mirrorOf>central</mirrorOf>
        <name>Nexus aliyun</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>
     </mirror>

配置本地仓库

#>vim setting.xml
#定位到这个节点进行编写
<localRepository>/home/maven/repo</localRepository>

以上是关于yum安装Maven的主要内容,如果未能解决你的问题,请参考以下文章

Yum安装Maven

CentOS yum 命令出现 [Errno 14] curl#6 - &quot;Couldn&#39;t resolve host ...&quot; 的解决方法(代码片段

ubuntu16.04 yum报错:There are no enabled repos. Run “yum repolist all“ to see the repos you have.(代码片段

jenkins 实验 yum安装

阿里云yum仓库和maven仓库配置记录

Linux下搭建jenkins+svn+http+maven自动化部署