CentOs maven安装

1、安装maven
2、下载maven
[root@VM_0_14_centos maven]# wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
3、解压并移动到指定的位置并改名
[root@VM_0_14_centos maven]# tar -zxvf apache-maven-3.3.9-bin.tar.gz 
[root@VM_0_14_centos maven]# mv apache-maven-3.3.9 /usr/local/install/
[root@VM_0_14_centos install]# mv apache-maven-3.3.9/ maven

4、 配置maven环境变量
[root@VM_0_14_centos install]# vim /etc/profile
修改的内容为:
export MAVEN_HOME=/usr/local/install/maven
export  PATH=${JAVA_HOME}/bin:/usr/local/mysql/bin:${MAVEN_HOME}/bin:$PATH

刷新配置:
source /etc/profile
5、测试maven有没有安装成功
[root@VM_0_14_centos install]# mvn -version

你可能感兴趣的:(CentOs maven安装)