一、到官网下载maven,上传到服务器上 https://maven.apache.org/download.cgiapache
二、将压缩包上传服务器对应路径解压:vim
tar -zxvf apache-maven-3.6.0-bin.tar.gz
三、配置环境变量bash
vim ~/.bash_profile
当即生效:服务器
source ~/.bash_profile
四、验证maven
mvn -version