centos6.5安装maven
2019獨(dú)角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>
1、下載(最新版下載地址從官網(wǎng)獲取:https://maven.apache.org/download.cgi)
wget http://mirrors.cnnic.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
2、解壓
tar xzvf apache-maven-3.3.9-bin.tar.gz
3、將解壓后的文件夾復(fù)制到安裝路徑
cp -r apache-maven-3.3.9 /usr/local/apache-maven
4、配置環(huán)境變量(首先要配置JAVA_HOME,通過echo $JAVA_HOME查看是否已配置)
vim /etc/profile
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk.x86_64
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export M2_HOME=/usr/local/apache-maven
export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
5、查看是否配置成功(Confirm with?mvn -v?in a new shell.)
mvn -v
出現(xiàn)類似下面的信息說明配置成功
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: /usr/local/apache-maven
Java version: 1.8.0_77, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.77-0.b03.el6_7.x86_64/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-431.23.3.el6.x86_64", arch: "amd64", family: "unix"
?
安裝參考官網(wǎng)文檔:https://maven.apache.org/install.html
?
轉(zhuǎn)載請注明原文出處:http://yyyit.com/2016/06/linux%E5%AE%89%E8%A3%85maven/
?
轉(zhuǎn)載于:https://my.oschina.net/JustLoveIT/blog/688920
總結(jié)
以上是生活随笔為你收集整理的centos6.5安装maven的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 权限框架 - shiro 简单入门实例
- 下一篇: .NET中常见的 IL 指令集