安裝maven
yum安裝方式,網速好可以正常安裝,網速不好請手動安裝,參考地址 https://www.cnblogs.com/daikainan/p/14282925.html
#配置源
wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
#安裝
yum -y install apache-maven
#查看版本
mvn -version
配置文件路徑
/etc/maven/settings.xml
配置阿里雲鏡像(因為要訪問國外服務器,會很慢)
在settings.xml文件中的mirrors下添加mirror標簽
vi /etc/maven/settings.xml
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
查找maven安裝路徑
#查找包路徑
rpm -qa|grep apache-maven
#根據包路徑查找安裝目錄
rpm -ql apache-maven