Centos7.6 搭建maven
1. 下载maven安装包
cd /opt/maven
wget --no-check-certificate https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz
2. 解压文件
tar -zxvf apache-maven-3.8.6-bin.tar.gz
3. 创建仓库
mkdir repository
4. 创建settings 文件
vim /usr/java/maven3.8/conf/settings.xml
alimaven aliyun maven http://maven.aliyun.com/nexus/content/groups/public/ central/usr/java/maven3.8/repository
5.配置环境变量
vim /etc/profile
export MAVEN_HOME=/opt/maven/apache-maven-3.8.6
export PATH= P A T H : PATH: PATH:MAVEN_HOME/bin
6. 环境变量使用及maven版本查看
source /etc/profile
mvn -v