查看“CentOS 7安装Maven and Ant”的源代码
←
CentOS 7安装Maven and Ant
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
=CentOS 7 yum安装Maven、Ant= <pre>#wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo yum -y install apache-maven yum -y install ant #Apache Maven 3.5.2 java version: 1.8.0_181 mvn -V Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T03:58:13-04:00) Maven home: /usr/share/apache-maven Java version: 1.8.0_181, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre </pre> =cento6 yum maven= <pre> 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 </pre> =bin包 安装Maven= <pre> wget -c http://www-us.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz tar xvf apache-maven-3.5.4-bin.tar.gz && mkdir -p /data/apps/ && mv apache-maven-3.5.4/ /data/apps/maven/ 添加环境变量 打开 /etc/profile, 添加如下内容: MAVEN_HOME=/data/apps/maven export PATH=$PATH:$MAVEN_HOME/bin 验证 mvn -v Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T14:33:14-04:00) Maven home: /data/apps/maven Java version: 1.8.0_121, vendor: Oracle Corporation, runtime: /usr/java/jdk1.8.0_121/jre Default locale: zh_CN, platform encoding: UTF-8 OS name: "linux", version: "3.10.0-693.el7.x86_64", arch: "amd64", family: "unix" </pre> [https://blog.csdn.net/Gred01/article/details/78724579 【Maven实战】之Linux环境下Nexus3.6安装] [https://blog.csdn.net/Gred01/article/details/78835169 【Maven实战】之基础知识点] =err= maven 配置(安装)以及遇到的The JAVA_HOME environment variable is not defined correctly. 重新配置 JAVA_HOME =see also= [http://lpyyn.iteye.com/blog/2190627 使用nexus搭建maven私服] [https://www.iteblog.com/archives/775.html Linux命令行下安装Maven与配置] [[category:linux]] [[category:ops]] [[category:java]]
返回至
CentOS 7安装Maven and Ant
。
导航菜单
个人工具
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
我的导航
关于我
shell
python
ops
linuxchina.net
blog.linuxchina
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息