CentOS 安装 Maven
时间:2015-07-22 01:30 来源:csdn 作者:IT
1、官网找到最新版的安装包:
http://maven.apache.org/download.cgi
拷贝文件名为 *-bin.tar.gz 的链接地址;
2、下载
# wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
3、解压
# tar xvf apache-maven-3.3.3-bin.tar.gz
如果需要:移动到其他目录
建立软连接:# ln -s apache-maven-3.3.3 maven
4、配置环境变量
# vi /etc/profile
export M2_HOME=/usr/local/apache-maven
export PATH=$PATH:$M2_HOME/bin
# source /etc/profile
5、验证是否安装成功
# mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T19:57:37+08:00)
Maven home: /opt/app/maven
Java version: 1.8.0_51, vendor: Oracle Corporation
Java home: /usr/java/jdk1.8.0_51/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-229.el7.x86_64", arch: "amd64", family: "unix"
(原创文章,转载请注明转自Clement-Xu的csdn博客。)
(责任编辑:IT)
1、官网找到最新版的安装包: http://maven.apache.org/download.cgi 拷贝文件名为 *-bin.tar.gz 的链接地址; 2、下载 # wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz 3、解压 # tar xvf apache-maven-3.3.3-bin.tar.gz 如果需要:移动到其他目录 建立软连接:# ln -s apache-maven-3.3.3 maven 4、配置环境变量 # vi /etc/profile export M2_HOME=/usr/local/apache-maven export PATH=$PATH:$M2_HOME/bin # source /etc/profile 5、验证是否安装成功 # mvn -version Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T19:57:37+08:00) Maven home: /opt/app/maven Java version: 1.8.0_51, vendor: Oracle Corporation Java home: /usr/java/jdk1.8.0_51/jre Default locale: zh_CN, platform encoding: UTF-8 OS name: "linux", version: "3.10.0-229.el7.x86_64", arch: "amd64", family: "unix" (原创文章,转载请注明转自Clement-Xu的csdn博客。) (责任编辑:IT) |